msgbartop
Adam Palmer MBCS CITP, Linux, PHP Programmer, MySQL Developer, Embedded Hardware, Security Consultant
Did my blog help you? Please link to me!
  dns test
 
RSS Feed
msgbarbottom

27 Sep 08 Linux Benchmark, IO statistics and system statistics with dstat

There are a number of common command line tools that we can use to monitor system resources. We have df for disk space, free for RAM usage, top for processes, bmon for network usage, etc. Quite often though, I find it useful to monitor them all simultaneously, and constantly switching commands or using ‘watch’ with free/df is annoying.

I came across dstat recently that gives a nice colorful overview of a choice of statistics. Here are some useful command line options from the man page:

-c [Show CPU stats]
-d [Show disk stats]
-l [Show load stats]
-m [Show memory stats]
-n [Show network stats]
-s [Show swap stats]
-t [Show time stats]
-y [Show system stats]
-a [All stats (-cdngy1)
-C[0,1,2,3,4,5,6,7,total] [Show individual CPU usage]

You can also output to CSV with –csv and disable color with –nocolor.
(more…)

Tags: , , , , , , , , , , , , , , ,

02 Jul 08 Bandwidth Limiting HOWTO with linux, tc and iproute2

I’ve recently optimized the scripts used for bandwidth management in one of our UK facilities and I thought I’d post a quick howto on it.

Discuss this page here

My setup here is a live feed entering eth0 on this linux router and leaving eth1 into a switch connected to a collection of other servers. This is set up as an unrestricted public router, routing between a /30 on eth0 and a /24 on eth1.
Note: We can’t in any way restrict the amount of traffic that eth0 receives from the outside, so instead we restrict how fast eth0 sends data out, the same applies the other way round. So, if we want to limit the amount of data that the local servers can send, we shape the router’s external interface (eth0). If we want to limit the amount of data that the local servers can receive, we shape the router’s internal interface (eth1)
(more…)

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , ,