top -bn1p1 .. should return the data for (b)atch processing, without any refreshed (n1), for process 1 (p1). (The p1 is there just to save it sending me data for all processes, I'm not interested in anything apart from the header information.)
It always[*] on my test system shows 4.9%sy
If I run top normally, I notice now that it always shows 4.9% on the first scan, then starts to vary.
Any suggestions as to why it never deviates on first scan?
[*] "Always" in as much as I have some code that logs the value every 5 mins, and for over a day it hasn't changed; it's a test server that is fairly heavily used during the day and not at all at night, so I'd expect some variation. All the CPU usage figures are almost static, there's max 0.1% variation in some of the others.
Also, suggestions as to other ways to get this sort of information would be welcomed. All I want is some sample data to use in another process, so I'm logging CPU, memory and disk usage (etc) as reported by top and df.