129 reputation
18
bio website twitter.com/zeizum
location Riga, Latvia
age 21
visits member for 9 months
seen May 16 at 17:36
stats profile views 4

Mar
6
comment Reading CPU usage
Since my system has only one core, this ended up in a error. Changing to k/(cores==""?1:cores * cpus) fixed the problem.
Mar
5
comment Reading CPU usage
Hmm, it seems to me, that top does not reflect the real usage. I made about 60 web-requests to the server, and all of them stayed on 97.7% idle, even though the table showed usage at 5.8% for top. I mean, it showed 97.7% in the header %Cpu(s): 1.5 us, 0.6 sy, 0.1 ni, 97.7 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st. Do I have to read the total usage from somewhere else or should I calculate on my end?
Mar
5
comment Reading CPU usage
Thanks for the free tip, and looks like I am gonna stick with top then. Accepted!
Mar
5
comment Reading CPU usage
I'm looking for a direct output to STDOUT, which I could grep. top continuously polls.
Mar
5
comment Reading CPU usage
@mpy, Q updated with example.
Aug
30
comment Partition used and available size in bytes
Total file system space. Let us continue this discussion in chat
Aug
30
comment Partition used and available size in bytes
I simply want to retrieve the actual size in bytes, I'm developing an web application that needs these values. That sdd1 partition resides in a USB flash. Partition is 3GB, and the filesystem there is built with mkfs.ext4, the particular partition is bootable (contains OS).
Aug
30
comment Partition used and available size in bytes
Oh, and these 201MiB's are OK for filesystem on 3.0GiB partition?
Aug
30
comment Partition used and available size in bytes
It's closer, but the result differs: parted /dev/sdd1 unit B print == 3221225472B == 3221225472, where df -B1 -a | grep /dev/sdd1 for Used + Available == 1152532480 + 1857056768 = 3009589248. And 3221225472 - 3009589248 = 211636224. In that case, where have those 201MiB's went?