Understood! But may be in case 'lscpu' is available nmon could just not print '/proc/cpuinfo', both print the "same " information. But as you say this not an issue... is just something that bothers me when I want to see the file with a text editor :-D. Thanks for the response.
Hi Nigel, Yes, I used to collect this information using the external data collectors. My problem there was that I collected the current output of cat /proc/net/dev which contains only the amount of bytes being trasmitted, received, etc. but not the actual datarate. So I had to do some post processing to calculate the datarate. I have also looked at njmon, it's a great tool but I like the csv format. Just grepping e.g. CPU_ALL gives me an idea about what is the CPU doing. I normally have a quick look...
Make BBBP information optional in csv
Show correct network interfaces data rate in csv file when virtual network interfaces are added/removed dynamically.
Thanks for integrating it! Question does: sleeptime = sleepremtime; compile OK - these are two data structures? Yes, it compiles fine and works fine. As struct timespec does not contain any pointers it is possible to copy it just like that. Examples I have seen use just the one variable for both requested and remainer structures This might work as well. Probably better as my proposed solution because there would be one less copy.
Here the changes I did to try it out: --- lmon16i.c 2019-07-03 09:54:57.877252371 +0200 +++ lmon16i_new.c 2019-07-03 09:54:05.505250566 +0200 @@ -4283,6 +4283,8 @@ char * slabstr; char truncated_command[257]; /* 256 +1 */ + struct timespec sleep_time; /* Fernando Addition */ + struct timespec sleep_rem_time; /* Fernando Addition */ #define MAXROWS 256 #define MAXCOLS 150 /* changed to allow maximum column widths */ @@ -8606,17 +8608,20 @@ nmon_run_time -= (double) seconds_over; } if (secs < 1) /*...
Use nanosleep() instead of sleep() in main loop to increase sleep granulatiry