Re: [pmacct-discussion] Debug print plugins

2018-12-13 Thread Paolo Lucente


Hi Fabien,

The config looks straightforward. It looks no data is coming in or input
data is stuck buffered inside the daemon. Please review this and see if
anything helps:

https://github.com/pmacct/pmacct/blob/1.7.2/QUICKSTART#L2475-#L2506

Paolo

On Thu, Dec 13, 2018 at 05:35:09PM +0100, Fabien VINCENT wrote:
> Dear List, 
> 
> I'm trying to do other tests with print plugin in json. But after some
> tests, I'm not able anymore to work the json file, it's never written on
> dis (I've removed a bit of sensitive informations with [...]) 
> 
> # /usr/local/sbin/nfacctd -d -f /opt/pmacct/conf/nfacctd.ebgp.conf 
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] plugin name/type:
> 'default'/'core'.
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] plugin name/type:
> 'generalOutEbgp'/'print'.
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] daemonize:false
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> pidfile:/var/run/nfacctd_ebgp.pid
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> logfile:/var/log/nfacctd/ebgp.log
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] syslog:daemon
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] interface:[...]
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_ip:[...]
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_port:[...]
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_as:bgp
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_as_new:bgp
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_time_new:true
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_disable_checks:true
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_net:bgp
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_renormalize:true
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> nfacctd_ext_sampling_rate:8000
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] refresh_maps:true
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> pre_tag_map:/opt/pmacct/conf/pretag.map
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> aggregate[generalOutEbgp]:dst_as,in_iface,out_iface,as_path,dst_host_country,peer_dst_as,peer_dst_ip,etype,tag
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> geoip_ipv4_file:/usr/share/GeoIP/GeoIP.dat
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> geoip_ipv6_file:/usr/share/GeoIP/GeoIPv6.dat
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] refresh_maps:true
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_daemon:true
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_daemon_ip:[...]
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_daemon_max_peers:4
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_peer_src_as_type:bgp
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_src_as_path_type:bgp
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_src_std_comm_type:bgp
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_stdcomm_pattern:[...]:
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_src_ext_comm_type:bgp
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> bgp_agent_map:/opt/pmacct/conf/ebgp.map
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> bgp_daemon_allow_file:/opt/pmacct/conf/bgp.allowed
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> print_output_file[generalOutEbgp]:/tmp/nfacctdOutEbgp.json
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> print_output[generalOutEbgp]:json
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> print_history[generalOutEbgp]:2m
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> print_history_roundoff[generalOutEbgp]:m
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> print_refresh_time[generalOutEbgp]:120
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> print_trigger_exec[generalOutEbgp]:/opt/nfacctd2influx/nfacctd2influx.sh
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> plugin_pipe_size[generalOutEbgp]:1024000
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
> plugin_buffer_size[generalOutEbgp]:1024
> DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] debug:true 
> 
> But file is never created on /tmp/nfacctdOutEbgp.json and purge happen
> without any effect : 
> 
> 2018-12-13T16:32:01Z INFO ( generalOutEbgp/print ): *** Purging cache -
> START (PID: 5604) ***
> 2018-12-13T16:32:01Z INFO ( generalOutEbgp/print ): *** Purging cache -
> END (PID: 5604, QN: 0/0, ET: 0) *** 
> 
> How can I tshoot the problem ? What's missing / wrong ? 
> 
> -- 
> 
> FABIEN VINCENT
> ---
>  @beufanet
> 
> ---

> ___
> pmacct-discussion mailing list
> http://www.pmacct.net/#mailinglists


___
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists


Re: [pmacct-discussion] Pmacct tips and trics (how to see all daemonized processes and how to kill them)

2018-12-13 Thread Paolo Lucente


Hi Edvinas,

You can use pidfile to ease your life with writing/retrieving pid files
of processes running (core, plugins, etc.). Other than that you can rely
on good old Linux tools. Some more info:

https://github.com/pmacct/pmacct/blob/1.7.2/docs/SIGNALS 
https://github.com/pmacct/pmacct/blob/master/CONFIG-KEYS#L839-#L844

Paolo

On Thu, Dec 13, 2018 at 05:31:29PM +0200, Edvinas K wrote:
> Hello,
> 
> Is't possible to see all daemonized processes and is there any option how
> to kill them ? or i need to use Linux basic commands like Kill, etc. ?
> 
> Thanks

> ___
> pmacct-discussion mailing list
> http://www.pmacct.net/#mailinglists


___
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists


[pmacct-discussion] Debug print plugins

2018-12-13 Thread Fabien VINCENT
Dear List, 

I'm trying to do other tests with print plugin in json. But after some
tests, I'm not able anymore to work the json file, it's never written on
dis (I've removed a bit of sensitive informations with [...]) 

# /usr/local/sbin/nfacctd -d -f /opt/pmacct/conf/nfacctd.ebgp.conf 
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] plugin name/type:
'default'/'core'.
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] plugin name/type:
'generalOutEbgp'/'print'.
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] daemonize:false
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
pidfile:/var/run/nfacctd_ebgp.pid
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
logfile:/var/log/nfacctd/ebgp.log
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] syslog:daemon
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] interface:[...]
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_ip:[...]
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_port:[...]
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_as:bgp
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_as_new:bgp
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_time_new:true
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_disable_checks:true
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_net:bgp
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] nfacctd_renormalize:true
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
nfacctd_ext_sampling_rate:8000
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] refresh_maps:true
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
pre_tag_map:/opt/pmacct/conf/pretag.map
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
aggregate[generalOutEbgp]:dst_as,in_iface,out_iface,as_path,dst_host_country,peer_dst_as,peer_dst_ip,etype,tag
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
geoip_ipv4_file:/usr/share/GeoIP/GeoIP.dat
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
geoip_ipv6_file:/usr/share/GeoIP/GeoIPv6.dat
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] refresh_maps:true
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_daemon:true
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_daemon_ip:[...]
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_daemon_max_peers:4
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_peer_src_as_type:bgp
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_src_as_path_type:bgp
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_src_std_comm_type:bgp
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_stdcomm_pattern:[...]:
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] bgp_src_ext_comm_type:bgp
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
bgp_agent_map:/opt/pmacct/conf/ebgp.map
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
bgp_daemon_allow_file:/opt/pmacct/conf/bgp.allowed
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
print_output_file[generalOutEbgp]:/tmp/nfacctdOutEbgp.json
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
print_output[generalOutEbgp]:json
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
print_history[generalOutEbgp]:2m
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
print_history_roundoff[generalOutEbgp]:m
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
print_refresh_time[generalOutEbgp]:120
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
print_trigger_exec[generalOutEbgp]:/opt/nfacctd2influx/nfacctd2influx.sh
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
plugin_pipe_size[generalOutEbgp]:1024000
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf]
plugin_buffer_size[generalOutEbgp]:1024
DEBUG: [/opt/pmacct/conf/nfacctd.ebgp.conf] debug:true 

But file is never created on /tmp/nfacctdOutEbgp.json and purge happen
without any effect : 

2018-12-13T16:32:01Z INFO ( generalOutEbgp/print ): *** Purging cache -
START (PID: 5604) ***
2018-12-13T16:32:01Z INFO ( generalOutEbgp/print ): *** Purging cache -
END (PID: 5604, QN: 0/0, ET: 0) *** 

How can I tshoot the problem ? What's missing / wrong ? 

-- 

FABIEN VINCENT
---
 @beufanet

---___
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

[pmacct-discussion] Pmacct tips and trics (how to see all daemonized processes and how to kill them)

2018-12-13 Thread Edvinas K
Hello,

Is't possible to see all daemonized processes and is there any option how
to kill them ? or i need to use Linux basic commands like Kill, etc. ?

Thanks
___
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists