Hello
function read_mem() uses $_ variable in "while(<IN>)...split;" But it is called from sample() function, which depends on value of $_; So, add some local temporary variable in read_mem() and use it in scanning <IN> file.
Thanks
the same for read_cpu "while(<CPU>)...split"
read_mem fails to get swap data
$ pstat -sk Device 1K-blocks Used Avail Capacity /dev/ad8s1b 2097152 764 2096388 0%
use "split ' ',$str" in previous patch
Log in to post a comment.
the same for read_cpu "while(<CPU>)...split"
read_mem fails to get swap data
$ pstat -sk
Device 1K-blocks Used Avail Capacity
/dev/ad8s1b 2097152 764 2096388 0%
use "split ' ',$str" in previous patch