pfstat not generating graphs after upgrading to -current

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

pfstat not generating graphs after upgrading to -current

Glenn Faustino
Hi,

I noticed that my system stop generating graphs for pfstat after upgrading
to -current. When I run the command manually it displays the following
error:


OpenBSD# pfstat -q -d /var/db/pfstat.db
ioctl: DIOCGETSTATUS: Permission denied
pf_query: query_counters() failed


Here's the dmesg:

OpenBSD 6.2-current (GENERIC) #5: Mon Feb 12 21:01:51 MST 2018
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 1056817152 (1007MB)
avail mem = 1017925632 (970MB)
enter_shared_special_pages: entered idt page va 0xffff800000010000 pa
0x1d3f000
enter_shared_special_pages: entered kutext page va 0xffffffff81820000 pa
0x1820000
enter_shared_special_pages: entered kutext page va 0xffffffff81821000 pa
0x1821000
enter_shared_special_pages: entered kutext page va 0xffffffff81822000 pa
0x1822000
cpu_enter_pages: entered tss+gdt page at va 0xffffffff81a90000 pa 0x1a90000
cpu_enter_pages: entered t.stack page at va 0xffffffff81a91000 pa 0x1a91000
cpu_enter_pages: cif_tss.tss_rsp0 = 0xffffffff81a913e0
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xf68f0 (9 entries)
bios0: vendor SeaBIOS version "
rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org" date 04/01/2014
bios0: QEMU Standard PC (i440FX + PIIX, 1996)
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP APIC HPET
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
lapic_map: entered lapic page va 0xffffffff81aa8000 pa 0xfee00000
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Virtual CPU a7769a6388d5, 2394.79 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,PCLMUL,SSSE3,FMA3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,RDTSCP,LONG,LAHF,ABM,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,ARAT,MELTDOWN
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 1000MHz
ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins
acpihpet0 at acpi0: 100000000 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!)
"ACPI0006" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"PNP0A06" at acpi0 not configured
"QEMU0002" at acpi0 not configured
"ACPI0010" at acpi0 not configured
pvbus0 at mainbus0: KVM
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA, channel
0 wired to compatibility, channel 1 wired to compatibility
pciide0: channel 0 disabled (no drives)
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.5+> ATAPI 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: apic 0 int 11
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: apic 0 int
9
iic0 at piixpm0
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio0: address 56:00:00:7c:b5:7b
virtio0: msix shared
virtio1 at pci0 dev 4 function 0 "Qumranet Virtio Storage" rev 0x00
vioblk0 at virtio1
scsibus2 at vioblk0: 2 targets
sd0 at scsibus2 targ 0 lun 0: <VirtIO, Block Device, > SCSI3 0/direct fixed
sd0: 25600MB, 512 bytes/sector, 52428800 sectors
virtio1: msix shared
virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Memory" rev 0x00
viomb0 at virtio2
virtio2: apic 0 int 10
virtio3 at pci0 dev 6 function 0 "Qumranet Virtio RNG" rev 0x00
viornd0 at virtio3
virtio3: apic 0 int 10
isa0 at pcib0
isadma0 at isa0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
usb0 at uhci0: USB revision 1.0
uhub0 at usb0 configuration 1 interface 0 "Intel UHCI root hub" rev
1.00/1.00 addr 1
uhidev0 at uhub0 port 1 configuration 1 interface 0 "QEMU QEMU USB Tablet"
rev 2.00/0.00 addr 2
uhidev0: iclass 3/0
ums0 at uhidev0: 3 buttons, Z dir
wsmouse1 at ums0 mux 0
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
root on sd0a (2719ba15e0dec7c1.a) swap on sd0b dump on sd0b
fd0 at fdc0 drive 1: density unknown



Regards,
Glenn
Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Jeroen
Hi,

Did you upgrade your packages after upgrading to -current? Can you
share your /etc/pfstat.conf?

-J.

On Wed, 2018-02-14 at 11:58 +0800, Glenn Faustino wrote:
> Hi,
>
> I noticed that my system stop generating graphs for pfstat after upgrading
> to -current. When I run the command manually it displays the following
> error:
>
> [CUTOFF]

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Glenn Faustino
Hi,


> Did you upgrade your packages after upgrading to -current? Can you
> share your /etc/pfstat.conf?

Every time I upgrade to -current I also update packages.

Here's my config:

[[hidden email]:~]$ doas cat /etc/pfstat.conf
doas ([hidden email]) password:
# $Id: pfstat.conf.example,v 1.1.1.1 2007/01/11 16:01:58 dhartmei Exp $
#
# /etc/pfstat.conf example
#

# collect
#   global
#     states entries|searches|inserts|removals [diff]
#     counters match|bad-offset|fragment|...|translate [diff]
#              (see pfctl -si output, same strings)
#   interface name pass|block packets|bytes in|out v4|v6 [diff]
#   queue name passed|dropped|other packets|bytes|number [diff]

collect 1 = interface "vio0" pass bytes in ipv4 diff
collect 2 = interface "vio0" pass bytes out ipv4 diff
collect 3 = global states entries

image "/var/www/htdocs/pfstat/pfstat-day-small.jpg" {
        from 24 hours to now
        width 300 height 200
        left
                graph 1 bps "in" "bits/s" color 0 192 0 filled,
                graph 2 bps "out" "bits/s" color 0 0 255
        right
                graph 3 "states" "entries" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-day-large.jpg" {
        from 24 hours to now
        width 980 height 300
        left
                graph 1 bps "in" "bits/s" color 0 192 0 filled,
                graph 2 bps "out" "bits/s" color 0 0 255
        right
                graph 3 "states" "entries" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-week-small.jpg" {
        from 7 days to now
        width 300 height 200
        left
                graph 1 bps "in" "bits/s" color 0 192 0 filled,
                graph 2 bps "out" "bits/s" color 0 0 255
        right
                graph 3 "states" "entries" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-week-large.jpg" {
        from 7 days to now
        width 980 height 300
        left
                graph 1 bps "in" "bits/s" color 0 192 0 filled,
                graph 2 bps "out" "bits/s" color 0 0 255
        right
                graph 3 "states" "entries" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-month-small.jpg" {
        from 4 weeks to now
        width 300 height 200
        left
                graph 1 bps "in" "bits/s" color 0 192 0 filled,
                graph 2 bps "out" "bits/s" color 0 0 255
        right
                graph 3 "states" "entries" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-month-large.jpg" {
        from 4 weeks to now
        width 980 height 300
        left
                graph 1 bps "in" "bits/s" color 0 192 0 filled,
                graph 2 bps "out" "bits/s" color 0 0 255
        right
                graph 3 "states" "entries" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-year-small.jpg" {
        from 12 months to now
        width 300 height 200
        left
                graph 1 bps "in" "bits/s" color 0 192 0 filled,
                graph 2 bps "out" "bits/s" color 0 0 255
        right
                graph 3 "states" "entries" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-year-large.jpg" {
        from 12 months to now
        width 980 height 300
        left
                graph 1 bps "in" "bits/s" color 0 192 0 filled,
                graph 2 bps "out" "bits/s" color 0 0 255
        right
                graph 3 "states" "entries" color 192 192 0
}

collect 4 = interface "vio0" pass packets in ipv4 diff
collect 5 = interface "vio0" pass packets out ipv4 diff
collect 6 = interface "vio0" block packets in ipv4 diff
collect 7 = interface "vio0" block packets out ipv4 diff

image "/var/www/htdocs/pfstat/pfstat-packets-day-small.jpg" {
        from 24 hours to now
        width 300 height 200
        left
                graph 4 "pass in"   "packets/s" color 0 192 0 filled,
                graph 5 "pass out"  "packets/s" color 0 0 255
        right
                graph 6 "block in"  "packets/s" color 255 0 0,
                graph 7 "block out" "packets/s" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-packets-day-large.jpg" {
        from 24 hours to now
        width 980 height 300
        left
                graph 4 "pass in"   "packets/s" color 0 192 0 filled,
                graph 5 "pass out"  "packets/s" color 0 0 255
        right
                graph 6 "block in"  "packets/s" color 255 0 0,
                graph 7 "block out" "packets/s" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-packets-week-small.jpg" {
        from 7 days to now
        width 300 height 200
        left
                graph 4 "pass in"   "packets/s" color 0 192 0 filled,
                graph 5 "pass out"  "packets/s" color 0 0 255
        right
                graph 6 "block in"  "packets/s" color 255 0 0,
                graph 7 "block out" "packets/s" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-packets-week-large.jpg" {
        from 7 days to now
        width 980 height 300
        left
                graph 4 "pass in"   "packets/s" color 0 192 0 filled,
                graph 5 "pass out"  "packets/s" color 0 0 255
        right
                graph 6 "block in"  "packets/s" color 255 0 0,
                graph 7 "block out" "packets/s" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-packets-month-small.jpg" {
        from 4 weeks to now
        width 300 height 200
        left
                graph 4 "pass in"   "packets/s" color 0 192 0 filled,
                graph 5 "pass out"  "packets/s" color 0 0 255
        right
                graph 6 "block in"  "packets/s" color 255 0 0,
                graph 7 "block out" "packets/s" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-packets-month-large.jpg" {
        from 4 weeks to now
        width 980 height 300
        left
                graph 4 "pass in"   "packets/s" color 0 192 0 filled,
                graph 5 "pass out"  "packets/s" color 0 0 255
        right
                graph 6 "block in"  "packets/s" color 255 0 0,
                graph 7 "block out" "packets/s" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-packets-year-small.jpg" {
        from 12 months to now
        width 300 height 200
        left
                graph 4 "pass in"   "packets/s" color 0 192 0 filled,
                graph 5 "pass out"  "packets/s" color 0 0 255
        right
                graph 6 "block in"  "packets/s" color 255 0 0,
                graph 7 "block out" "packets/s" color 192 192 0
}

image "/var/www/htdocs/pfstat/pfstat-packets-year-large.jpg" {
        from 12 months to now
        width 980 height 300
        left
                graph 4 "pass in"   "packets/s" color 0 192 0 filled,
                graph 5 "pass out"  "packets/s" color 0 0 255
        right
                graph 6 "block in"  "packets/s" color 255 0 0,
                graph 7 "block out" "packets/s" color 192 192 0
}

collect  8 = global states inserts  diff
collect  9 = global states removals diff
collect 10 = global states searches diff

image "/var/www/htdocs/pfstat/pfstat-states-day-small.jpg" {
        from 24 hours to now
        width 300 height 200
        left
                graph 8 "inserts" "states/s" color 0 192 0 filled,
                graph 9 "removals" "states/s" color 0 0 255
        right
                graph 10 "searches" "states/s" color 255 0 0
}

image "/var/www/htdocs/pfstat/pfstat-states-day-large.jpg" {
        from 24 hours to now
        width 980 height 300
        left
                graph 8 "inserts" "states/s" color 0 192 0 filled,
                graph 9 "removals" "states/s" color 0 0 255
        right
                graph 10 "searches" "states/s" color 255 0 0
}

image "/var/www/htdocs/pfstat/pfstat-states-week-small.jpg" {
        from 7 days to now
        width 300 height 200
        left
                graph 8 "inserts" "states/s" color 0 192 0 filled,
                graph 9 "removals" "states/s" color 0 0 255
        right
                graph 10 "searches" "states/s" color 255 0 0
}

image "/var/www/htdocs/pfstat/pfstat-states-week-large.jpg" {
        from 7 days to now
        width 980 height 300
        left
                graph 8 "inserts" "states/s" color 0 192 0 filled,
                graph 9 "removals" "states/s" color 0 0 255
        right
                graph 10 "searches" "states/s" color 255 0 0
}

image "/var/www/htdocs/pfstat/pfstat-states-month-small.jpg" {
        from 4 weeks to now
        width 300 height 200
        left
                graph 8 "inserts" "states/s" color 0 192 0 filled,
                graph 9 "removals" "states/s" color 0 0 255
        right
                graph 10 "searches" "states/s" color 255 0 0
}

image "/var/www/htdocs/pfstat/pfstat-states-month-large.jpg" {
        from 4 weeks to now
        width 980 height 300
        left
                graph 8 "inserts" "states/s" color 0 192 0 filled,
                graph 9 "removals" "states/s" color 0 0 255
        right
                graph 10 "searches" "states/s" color 255 0 0
}

image "/var/www/htdocs/pfstat/pfstat-states-year-small.jpg" {
        from 12 months to now
        width 300 height 200
        left
                graph 8 "inserts" "states/s" color 0 192 0 filled,
                graph 9 "removals" "states/s" color 0 0 255
        right
                graph 10 "searches" "states/s" color 255 0 0
}

image "/var/www/htdocs/pfstat/pfstat-states-year-large.jpg" {
        from 12 months to now
        width 980 height 300
        left
                graph 8 "inserts" "states/s" color 0 192 0 filled,
                graph 9 "removals" "states/s" color 0 0 255
        right
                graph 10 "searches" "states/s" color 255 0 0
}

collect 15 = global counters match          diff
collect 16 = global counters bad-offset     diff
collect 17 = global counters fragment       diff
collect 18 = global counters short          diff
collect 19 = global counters normalize      diff
collect 20 = global counters memory         diff
collect 21 = global counters bad-timestamp  diff
collect 22 = global counters congestion     diff
collect 23 = global counters ip-option      diff
collect 24 = global counters proto-cksum    diff
collect 25 = global counters state-mismatch diff
collect 26 = global counters state-insert   diff
collect 27 = global counters state-limit    diff
collect 28 = global counters src-limit      diff
collect 29 = global counters synproxy       diff

image "/var/www/htdocs/pfstat/pfstat-errors-day-small.jpg" {
        from 24 hours to now
        width 300 height 200
        left
                graph 17 "frag" "/s" color 192 0 192,
                graph 22 "cong" "/s" color 0 192 192,
                graph 23 "iopt" "/s" color 0 0 255,
                graph 24 "csum" "/s" color 192 192 0,
                graph 25 "mism" "/s" color 255 0 0
        right
                graph 15 "match" "/s" color 0 192 0
}

image "/var/www/htdocs/pfstat/pfstat-errors-day-large.jpg" {
        from 24 hours to now
        width 980 height 300
        left
                graph 17 "frag" "/s" color 192 0 192,
                graph 22 "cong" "/s" color 0 192 192,
                graph 23 "iopt" "/s" color 0 0 255,
                graph 24 "csum" "/s" color 192 192 0,
                graph 25 "mism" "/s" color 255 0 0
        right
                graph 15 "match" "/s" color 0 192 0
}

image "/var/www/htdocs/pfstat/pfstat-errors-week-small.jpg" {
        from 7 days to now
        width 300 height 200
        left
                graph 17 "frag" "/s" color 192 0 192,
                graph 22 "cong" "/s" color 0 192 192,
                graph 23 "iopt" "/s" color 0 0 255,
                graph 24 "csum" "/s" color 192 192 0,
                graph 25 "mism" "/s" color 255 0 0
        right
                graph 15 "match" "/s" color 0 192 0
}

image "/var/www/htdocs/pfstat/pfstat-errors-week-large.jpg" {
        from 7 days to now
        width 980 height 300
        left
                graph 17 "frag" "/s" color 192 0 192,
                graph 22 "cong" "/s" color 0 192 192,
                graph 23 "iopt" "/s" color 0 0 255,
                graph 24 "csum" "/s" color 192 192 0,
                graph 25 "mism" "/s" color 255 0 0
        right
                graph 15 "match" "/s" color 0 192 0
}

image "/var/www/htdocs/pfstat/pfstat-errors-month-small.jpg" {
        from 4 weeks to now
        width 300 height 200
        left
                graph 17 "frag" "/s" color 192 0 192,
                graph 22 "cong" "/s" color 0 192 192,
                graph 23 "iopt" "/s" color 0 0 255,
                graph 24 "csum" "/s" color 192 192 0,
                graph 25 "mism" "/s" color 255 0 0
        right
                graph 15 "match" "/s" color 0 192 0
}

image "/var/www/htdocs/pfstat/pfstat-errors-month-large.jpg" {
        from 4 weeks to now
        width 980 height 300
        left
                graph 17 "frag" "/s" color 192 0 192,
                graph 22 "cong" "/s" color 0 192 192,
                graph 23 "iopt" "/s" color 0 0 255,
                graph 24 "csum" "/s" color 192 192 0,
                graph 25 "mism" "/s" color 255 0 0
        right
                graph 15 "match" "/s" color 0 192 0
}

image "/var/www/htdocs/pfstat/pfstat-errors-year-small.jpg" {
        from 12 months to now
        width 300 height 200
        left
                graph 17 "frag" "/s" color 192 0 192,
                graph 22 "cong" "/s" color 0 192 192,
                graph 23 "iopt" "/s" color 0 0 255,
                graph 24 "csum" "/s" color 192 192 0,
                graph 25 "mism" "/s" color 255 0 0
        right
                graph 15 "match" "/s" color 0 192 0
}

image "/var/www/htdocs/pfstat/pfstat-errors-year-large.jpg" {
        from 12 months to now
        width 980 height 300
        left
                graph 17 "frag" "/s" color 192 0 192,
                graph 22 "cong" "/s" color 0 192 192,
                graph 23 "iopt" "/s" color 0 0 255,
                graph 24 "csum" "/s" color 192 192 0,
                graph 25 "mism" "/s" color 255 0 0
        right
                graph 15 "match" "/s" color 0 192 0
}

Regards,
Glenn

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Jeroen
Hi,

Strange. With the default pfstat.conf it works fine, though when I try
it with your config (though edited to my setup), I get exactly the same
error as you did. Also on -current.

Are you able to rebuilt your config, piece by piece and see where it
fails? That might help to narrow it down tremendously.

-J.

On Wed, 2018-02-14 at 18:30 +0800, Glenn Faustino wrote:
> Hi,
>
>
> > Did you upgrade your packages after upgrading to -current? Can you
> > share your /etc/pfstat.conf?
>
> Every time I upgrade to -current I also update packages.
>

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Stuart Henderson
In reply to this post by Glenn Faustino
On 2018-02-14, Glenn Faustino <[hidden email]> wrote:
> Hi,
>
>
>> Did you upgrade your packages after upgrading to -current? Can you
>> share your /etc/pfstat.conf?
>
> Every time I upgrade to -current I also update packages.

Try forcing pfstat to update (pkg_delete and pkg_add maybe, if that
doesn't help then build it yourself from ports). If that helps then let
me know because we need to figure out what change necessitated this and
track down which ports need REVISION bumps to force updates..


Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Theo Buehler-3
On Thu, Feb 15, 2018 at 12:29:23AM +0000, Stuart Henderson wrote:

> On 2018-02-14, Glenn Faustino <[hidden email]> wrote:
> > Hi,
> >
> >
> >> Did you upgrade your packages after upgrading to -current? Can you
> >> share your /etc/pfstat.conf?
> >
> > Every time I upgrade to -current I also update packages.
>
> Try forcing pfstat to update (pkg_delete and pkg_add maybe, if that
> doesn't help then build it yourself from ports). If that helps then let
> me know because we need to figure out what change necessitated this and
> track down which ports need REVISION bumps to force updates..

Henning's SYN-cookies came with an ABI break in the ioctl path for
/dev/pf (after it was committed, at least pfctl and pflogd needed to be
rebuilt).

This diff seems to fix pfstat{,d} for me, but only superficially tested,
as I don't use the port normally. It adds a missing header for time(3).

Index: pfstat/Makefile
===================================================================
RCS file: /var/cvs/ports/net/pfstat/Makefile,v
retrieving revision 1.38
diff -u -p -r1.38 Makefile
--- pfstat/Makefile 11 Jan 2018 19:27:07 -0000 1.38
+++ pfstat/Makefile 14 Feb 2018 04:03:20 -0000
@@ -9,8 +9,8 @@ PKGNAME-main= ${DISTNAME}
 PKGNAME-daemon= ${DISTNAME:S/-/d-/}
 CATEGORIES= net
 MASTER_SITES= http://www.benzedrine.ch/
-REVISION-daemon=2
-REVISION-main= 1
+REVISION-daemon=3
+REVISION-main= 2
 
 HOMEPAGE= http://www.benzedrine.ch/pfstat.html
 
Index: pfstat/patches/patch-pfstat_c
===================================================================
RCS file: pfstat/patches/patch-pfstat_c
diff -N pfstat/patches/patch-pfstat_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pfstat/patches/patch-pfstat_c 14 Feb 2018 04:06:57 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: pfstat.c
+--- pfstat.c.orig
++++ pfstat.c
+@@ -44,6 +44,7 @@ static const char rcsid[] = "$Id: pfstat.c,v 1.2 2010/
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <time.h>
+ #include <unistd.h>
+
+ #include "data.h"

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Sebastien Marie-3
In reply to this post by Stuart Henderson
On Thu, Feb 15, 2018 at 12:29:23AM +0000, Stuart Henderson wrote:

> On 2018-02-14, Glenn Faustino <[hidden email]> wrote:
> > Hi,
> >
> >> Did you upgrade your packages after upgrading to -current? Can you
> >> share your /etc/pfstat.conf?
> >
> > Every time I upgrade to -current I also update packages.
>
> Try forcing pfstat to update (pkg_delete and pkg_add maybe, if that
> doesn't help then build it yourself from ports). If that helps then let
> me know because we need to figure out what change necessitated this and
> track down which ports need REVISION bumps to force updates..
>

I had a similar problem with pftop (pftop-0.7p16).

$ doas pftop
pftop: DIOCGETSTATUS: Permission denied

After forcing a reinstall (pkg_delete + pkg_add) it works again.

From my /var/log/messages, the previous reinstall (done using pkg_ad -u)
was from Jan 20:

$ grep pftop /var/log/messages
Dec 30 10:10:58 alf pkg_add: Added pftop-0.7p16->0.7p16
Jan 20 11:20:49 alf pkg_add: Added pftop-0.7p16->0.7p16
Feb 15 06:40:54 alf pkg_delete: Removed pftop-0.7p16
Feb 15 06:41:03 alf pkg_add: Added pftop-0.7p16

Thanks.
--
Sebastien Marie

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Glenn Faustino
On Thu, Feb 15, 2018 at 1:48 PM, Sebastien Marie <[hidden email]> wrote:

> On Thu, Feb 15, 2018 at 12:29:23AM +0000, Stuart Henderson wrote:
>> On 2018-02-14, Glenn Faustino <[hidden email]> wrote:
>> > Hi,
>> >
>> >> Did you upgrade your packages after upgrading to -current? Can you
>> >> share your /etc/pfstat.conf?
>> >
>> > Every time I upgrade to -current I also update packages.
>>
>> Try forcing pfstat to update (pkg_delete and pkg_add maybe, if that
>> doesn't help then build it yourself from ports). If that helps then let
>> me know because we need to figure out what change necessitated this and
>> track down which ports need REVISION bumps to force updates..
>>
>
> I had a similar problem with pftop (pftop-0.7p16).
>
> $ doas pftop
> pftop: DIOCGETSTATUS: Permission denied
>
> After forcing a reinstall (pkg_delete + pkg_add) it works again.
>
> From my /var/log/messages, the previous reinstall (done using pkg_ad -u)
> was from Jan 20:
>
> $ grep pftop /var/log/messages
> Dec 30 10:10:58 alf pkg_add: Added pftop-0.7p16->0.7p16
> Jan 20 11:20:49 alf pkg_add: Added pftop-0.7p16->0.7p16
> Feb 15 06:40:54 alf pkg_delete: Removed pftop-0.7p16
> Feb 15 06:41:03 alf pkg_add: Added pftop-0.7p16
>
> Thanks.
> --
> Sebastien Marie
>

After deleting and installing pfstat it now works, thanks guys!

Feb 15 14:26:37 OpenBSD pkg_delete: Removed pfstat-2.5p1
Feb 15 14:27:02 OpenBSD pkg_add: Added pfstat-2.5p1

$ doas pfstat -q -d /var/db/pfstat.db
$


Regards,
Glenn

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Kaya Saman-2


On 02/15/2018 06:39 AM, Glenn Faustino wrote:

> On Thu, Feb 15, 2018 at 1:48 PM, Sebastien Marie <[hidden email]> wrote:
>> On Thu, Feb 15, 2018 at 12:29:23AM +0000, Stuart Henderson wrote:
>>> On 2018-02-14, Glenn Faustino <[hidden email]> wrote:
>>>> Hi,
>>>>
>>>>> Did you upgrade your packages after upgrading to -current? Can you
>>>>> share your /etc/pfstat.conf?
>>>> Every time I upgrade to -current I also update packages.
>>> Try forcing pfstat to update (pkg_delete and pkg_add maybe, if that
>>> doesn't help then build it yourself from ports). If that helps then let
>>> me know because we need to figure out what change necessitated this and
>>> track down which ports need REVISION bumps to force updates..
>>>
>> I had a similar problem with pftop (pftop-0.7p16).
>>
>> $ doas pftop
>> pftop: DIOCGETSTATUS: Permission denied
>>
>> After forcing a reinstall (pkg_delete + pkg_add) it works again.
>>
>>  From my /var/log/messages, the previous reinstall (done using pkg_ad -u)
>> was from Jan 20:
>>
>> $ grep pftop /var/log/messages
>> Dec 30 10:10:58 alf pkg_add: Added pftop-0.7p16->0.7p16
>> Jan 20 11:20:49 alf pkg_add: Added pftop-0.7p16->0.7p16
>> Feb 15 06:40:54 alf pkg_delete: Removed pftop-0.7p16
>> Feb 15 06:41:03 alf pkg_add: Added pftop-0.7p16
>>
>> Thanks.
>> --
>> Sebastien Marie
>>
> After deleting and installing pfstat it now works, thanks guys!
>
> Feb 15 14:26:37 OpenBSD pkg_delete: Removed pfstat-2.5p1
> Feb 15 14:27:02 OpenBSD pkg_add: Added pfstat-2.5p1
>
> $ doas pfstat -q -d /var/db/pfstat.db
> $
>
>
> Regards,
> Glenn
>

Hi,

I'm experiencing the exact same issues for both pfstat and pftop
however, running pkg_delete / pkg_add doesn't seem to work for me as a
fix :-(


pfstat -q -p
ioctl: DIOCGETSTATUS: Permission denied
pf_query: query_counters() failed

pftop: DIOCGETSTATUS: Permission denied


uname -a : 6.2 GENERIC.MP#408 amd64 <- also CURRENT updated a few days ago


Regards,

Kaya

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Glenn Faustino
>> After deleting and installing pfstat it now works, thanks guys!
>>
>> Feb 15 14:26:37 OpenBSD pkg_delete: Removed pfstat-2.5p1
>> Feb 15 14:27:02 OpenBSD pkg_add: Added pfstat-2.5p1
>>
>> $ doas pfstat -q -d /var/db/pfstat.db
>> $
>>
>>
>> Regards,
>> Glenn
>>
>
> Hi,
>
> I'm experiencing the exact same issues for both pfstat and pftop however,
> running pkg_delete / pkg_add doesn't seem to work for me as a fix :-(
>
>
> pfstat -q -p
> ioctl: DIOCGETSTATUS: Permission denied
> pf_query: query_counters() failed
>
> pftop: DIOCGETSTATUS: Permission denied
>
>
> uname -a : 6.2 GENERIC.MP#408 amd64 <- also CURRENT updated a few days ago
>
>
> Regards,
>
> Kaya
>

Mine is OpenBSD 6.2-current (GENERIC) #6: Tue Feb 13 20:12:04 MST 2018

Can you try installing the latest snapshot?

Regards,
Glenn

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Sebastien Marie-3
In reply to this post by Kaya Saman-2
On Thu, Feb 15, 2018 at 07:29:25AM +0000, Kaya Saman wrote:
>
> Hi,
>
> I'm experiencing the exact same issues for both pfstat and pftop however,
> running pkg_delete / pkg_add doesn't seem to work for me as a fix :-(
>

what is the output of:

$ grep -H sign /var/db/pkg/pftop-*/+CONTENTS

on my host, I have:

$ grep -H sign /var/db/pkg/pftop-*/+CONTENTS
/var/db/pkg/pftop-0.7p16/+CONTENTS:@signer openbsd-62-pkg
/var/db/pkg/pftop-0.7p16/+CONTENTS:@digital-signature signify2:2018-02-14T13:28:34Z:external

the signature date could permit to check the exact version of the
package you have, in case your mirror is lagging a bit and still provide
an "old" version (with old ABI, if it is the problem as it seems).

Thanks.
--
Sebastien Marie

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Stuart Henderson
In reply to this post by Theo Buehler-3
On 2018-02-15, Theo Buehler <[hidden email]> wrote:

> On Thu, Feb 15, 2018 at 12:29:23AM +0000, Stuart Henderson wrote:
>> On 2018-02-14, Glenn Faustino <[hidden email]> wrote:
>> > Hi,
>> >
>> >
>> >> Did you upgrade your packages after upgrading to -current? Can you
>> >> share your /etc/pfstat.conf?
>> >
>> > Every time I upgrade to -current I also update packages.
>>
>> Try forcing pfstat to update (pkg_delete and pkg_add maybe, if that
>> doesn't help then build it yourself from ports). If that helps then let
>> me know because we need to figure out what change necessitated this and
>> track down which ports need REVISION bumps to force updates..
>
> Henning's SYN-cookies came with an ABI break in the ioctl path for
> /dev/pf (after it was committed, at least pfctl and pflogd needed to be
> rebuilt).
>
> This diff seems to fix pfstat{,d} for me, but only superficially tested,
> as I don't use the port normally. It adds a missing header for time(3).

OK sthen@. Presumably it's because struct pf_status gained new members
in the middle (though the exact reason doesn't matter, whatever the
cause the fix is to rebuild).

I'm doing a search for other DIOCGETSTATUS users in ports and will take
care of the rest.


Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

Kaya Saman-2
In reply to this post by Glenn Faustino


On 02/15/18 07:48, Glenn Faustino wrote:

>>> After deleting and installing pfstat it now works, thanks guys!
>>>
>>> Feb 15 14:26:37 OpenBSD pkg_delete: Removed pfstat-2.5p1
>>> Feb 15 14:27:02 OpenBSD pkg_add: Added pfstat-2.5p1
>>>
>>> $ doas pfstat -q -d /var/db/pfstat.db
>>> $
>>>
>>>
>>> Regards,
>>> Glenn
>>>
>> Hi,
>>
>> I'm experiencing the exact same issues for both pfstat and pftop however,
>> running pkg_delete / pkg_add doesn't seem to work for me as a fix :-(
>>
>>
>> pfstat -q -p
>> ioctl: DIOCGETSTATUS: Permission denied
>> pf_query: query_counters() failed
>>
>> pftop: DIOCGETSTATUS: Permission denied
>>
>>
>> uname -a : 6.2 GENERIC.MP#408 amd64 <- also CURRENT updated a few days ago
>>
>>
>> Regards,
>>
>> Kaya
>>
> Mine is OpenBSD 6.2-current (GENERIC) #6: Tue Feb 13 20:12:04 MST 2018
>
> Can you try installing the latest snapshot?
>
> Regards,
> Glenn

Hi Glenn,

just updated now and ran pkg_delete / pkg_install again for pftop /
pfstat but unfortunately they still come up with the same error.
Probably because I have a few tunnel interfaces and pppoe interfaces ??
{wild guess}

Also it seems that at boot pf doesn't seem to read or like my pf.conf.
After the system has booted I can manually get pf to read the file using
pfctl -f /etc/pf.conf but it should be automatic.....


Regards,


Kaya

Reply | Threaded
Open this post in threaded view
|

Re: pfstat not generating graphs after upgrading to -current

lists-2
Thu, 15 Feb 2018 17:23:34 +0000 Kaya Saman <[hidden email]>
> [...]
> just updated now and ran pkg_delete / pkg_install again for pftop /
> pfstat but unfortunately they still come up with the same error.
> [...]
>

Hi Kaya,

Try this process for pftop and see if this makes a difference for you.
Here is the output from this system, just before the upgrade attempts:

$ pftop
pftop: open("/dev/pf"): Permission denied
$ doas pftop
> Error Reading status (DIOCGETSTATUS): Permission denied
pftop: DIOCGETSTATUS: Permission denied

Here is a typical attempt to upgrade just as you would normally do it:

$ doas pkg_add -vvvvv -ui pftop
---quirks---
Update candidates: pftop-0.7p16 -> pftop-0.7p16
Comparing full signature for pftop-0.7p16 "pftop-0.7p16,0,c.92.3,curses.14.0" vs. "pftop-0.7p16,0,c.92.3,curses.14.0":equal
No change in pftop-0.7p16

Then it would (as expected) be the same thing when you try running it.
Now the key part, try to reinstall with some -D flags, see pkg_add(1):

$ doas pkg_add -vvvvv -ur -D installed -D updatedepends -D snap pftop
---quirks---
Update candidates: pftop-0.7p16 -> pftop-0.7p16
parsing pftop-0.7p16
found libspec c.92.3 in /usr/lib
found libspec curses.14.0 in /usr/lib
Tieing man/man8/pftop.8 to man/man8/pftop.8
Looking for changes in shared libraries
No libraries to keep
extract sbin/pftop -> /usr/local/sbin/pkg.2cnHMHvU31
link /usr/local/man/man8/pftop.8 -> /usr/local/man/man8/pkg.WlhSyO0cDy
Running /usr/sbin/makewhatis -u /usr/local/man -- /usr/local/man/man8/pftop.8
deleting: /usr/local/man/man8/pftop.8
deleting: /usr/local/sbin/pftop
moving /usr/local/man/man8/pkg.WlhSyO0cDy -> /usr/local/man/man8/pftop.8
moving /usr/local/sbin/pkg.2cnHMHvU31 -> /usr/local/sbin/pftop
pftop-0.7p16->0.7p16: ok
Read shared items: ok
Clean shared items: ok
Running /usr/sbin/makewhatis -d /usr/local/man -- /usr/local/man/man8/pftop.8
Extracted 185576 from 235298

See the difference, now running it again with $SUDO works as expected.

$ doas pftop

For details of the -D flags to use with pkg_add see the man page here:

http://man.openbsd.org/pkg_add#D

Kind regards,
Anton Lazarov