intel / intel-cmt-cat

User space software for Intel(R) Resource Director Technology
http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
Other
692 stars 182 forks source link

pqos stop cleanly on SIGINT or Ctrl + C, but leave garbage files on SIGTERM #197

Closed guoqiao closed 2 years ago

guoqiao commented 2 years ago

while testing the telegraf intel RDT plugin, we noticed pqo process will stop cleanly with Ctrl + C, or kill -SIGINT $PID. However, it leaves garbage files on disk with kill $PID (kill sends -SIGTERM by default).

How to reproduce:

on ubuntu 18.04/20.04, with required CPU, and intel-cmt-cat installed:

sudo -i cd /sys/fs/resctrl/mon_groups

/usr/sbin/pqos -r --iface-os --mon-file-type=csv --mon-interval=10 --mon-core=all:[0,1]\;mbt:[0,1]\;

  1. run above cmd, close it with Ctrl + C or kill -SIGINT $PID, then ls, no files left.
  2. run cmd again, ps -ef | grep pqos to get $PID, run kill $PID, you can see garbage files like this:
/sys/fs/resctrl/mon_groups# tree .
.
└── pqos-28194-0
    ├── cpus
    ├── cpus_list
    ├── mon_data
    │   └── mon_L3_00
    │       ├── llc_occupancy
    │       ├── mbm_local_bytes
    │       └── mbm_total_bytes
    └── tasks

NOTE: if run cmd again, above dir will be deleted, new dir like pqos-$PID-0 will be generated.

For the background of this issue, please refer to #198

kmabbasi commented 2 years ago

Thanks for the feedback.

We have pushed a fix on master branch. It usually takes few hours to be shown on GitHub.

Can you try it again later today or tomorrow?

Thanks, Khawar

guoqiao commented 2 years ago

Thanks for the feedback.

We have pushed a fix on master branch. It usually takes few hours to be shown on GitHub.

Can you try it again later today or tomorrow?

Thanks, Khawar

Hi @kmabbasi thanks for the quick response 💯