4

I recently began working with a device that uses embedded Linux and BusyBox. It is very stripped down, and does not have iostat or sar. It also doesn't have dpkg or apt for package management. The system is a development black-box under a non-disclosure agreement, O.S. version info is:

Linux localhost 2.6.34 #1 SMP Fri Sep 14 10:12:23 EDT 2012 armv7l GNU/Linux

I'd like to monitor system resources, particularly CPU and memory usage, and am wondering how to do this. It appears that the only command available through BusyBox is top, and I'd like other alternatives.

I guess I could cross-compile sar on my Windows development system and somehow copy it over, but I've never done that... however, am willing to give it a try if that's my best option, so tips in that area would be appreciated.

Edit: After reading Linux Implementation of SAR, it appears I wouldn't simply cross-compile sar, rather the sysstat suite of utilities which contains sar and other related commands.

Alan
  • 541
  • 1
  • 6
  • 20

1 Answers1

5

/proc/loadavg and /proc/meminfo should be available, so you could do

cat /proc/loadavg
cat /proc/meminfo

in a small script and process it.

pevik
  • 286
  • 1
  • 12
Sandor Marton
  • 1,544
  • 9
  • 12
  • Yeah, I'd be doing what *sar* does, and was trying not to re-invent the wheel, however may end up doing that. – Alan May 07 '13 at 16:26
  • I've accepted your answer because I've decided to parse the files myself and post their status to our Nagios server where it will graph the data for me. – Alan May 07 '13 at 17:16