Tuesday, August 17, 2010

Tool of the Day: sar and bsdsar

Tools like uptime and free (or freecolor on FreeBSD) are terrific. But, what if you want to get stats from the past few hours or days? You could rig up a shell script to capture these tools to a log file.

Or, you could use the almost-magical sar or bsdsar tools.

These commands efficiently maintain a history of your server performance and allow you to get to the stats after the fact. This is wonderful when you think you've got a server performance issue, but don't have much in the way of stats to back up your hunch.

My suggestion: make sure the sar command is installed *before* you need it.

On Linux I run:

 yum install sysstat

To get access to the sar command. On FreeBSD I followed the helpful instructions here.

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails