ntop / PF_RING

High-speed packet processing framework
http://www.ntop.org
GNU Lesser General Public License v2.1
2.67k stars 353 forks source link

Set a custom file name for pfring_zc_set_proc_stats #627

Open EaseTheWorld opened 4 years ago

EaseTheWorld commented 4 years ago

Well, this is not an issue, more like suggestion. When I use zbalance_ipc, I want to show its stats. But pfring_zc_set_proc_stats() saves stat file 'pid'-none.#### which is not predictable. I think this is for unique filename but cluster_id itself is not enough for uniqueness? or user-specified name would be possible as well. (I thought pfring_zc_set_app_name is for this but it's not. what is app_name for?)

cardigliano commented 4 years ago

pfring_zc_set_app_name is used to set the application name in the /proc/net/pf_ring/ file. In essence you want to create /proc/net/pf_ring/stats/ with a custom name set by the application.

EaseTheWorld commented 4 years ago

Yes. custom name(given as zbalance_ipc args) or cluser_num would be useful. Until yesterday, I didn't know stat file was there and even zbalance_ipc itself doesn't know the filename either.

zinosat commented 3 years ago

this could be an interesting enhancement applicable to pfring_set_application_stats() too