Today I had the pleasure (or pressure) to install RSTATD on Ubuntu since we needed to monitor one of our hosts during a stress test. It turned out to be not so simple so I’m documenting the steps here:
- Install the packages:
sudo xinetd rstatd
We need to specifically ask for xinetd since we need to configure RSTATD service below.
- Create the file “/etc/xinetd.d/rstatd” with the following content
# default: off
# # description: An xinetd internal service which rstatd’s characters back to clients.
#
service rstatd
{
type = RPC
rpc_version = 2-4
socket_type = dgramprotocol = udp
wait = yes
user = root
log_on_success += USERIDlog_on_failure += USERID
server = /usr/sbin/rpc.rstatd
disable = no
} - Install rstat-client (optional):
sudo apt-get install rstat-client
- To test it (using rsysinfo from rstat-client package):
root@ci-server3:~# rsysinfo localhost
System Information for: localhost
uptime: 24 days, 17:32, load average: 0.05 0.07 0.07
cpu usage (jiffies): user 1455679 nice 550 system 624328 idle 420845047
page in: 2308807 page out: 16027072 swap in: 673 swap out: 4985
intr: 158243781 context switches: 346475642
disks: 1383151 0 0 0
ethernet: rx: 1901663 rx-err: 58
tx: 1271589 tx-err: 0 collisions: 0 - That’s it!
Tags: linux, monitoring, rstat, rstatd, stress test
September 6, 2010 at 5:13 am |
HI i have done the above process but when i give rsysinfo localhost ,
I am getting as follows
rsysinfo: RPC: program not registered.
What should i do now
September 6, 2010 at 5:21 am |
Check rstatd. It might not have been started.