I'm using the Ubuntu 10.04.4LTS, and have Ganglia installed in my computer.
I used to get the Gmetad data by typing:
telnet localhost 8651 > /test/test.txt
or made a .sh file to run it. After this I want to get Gmetad data periodically. I try Crontab. After some simple test I am sure that the Crontab works in my Ubuntu. However, when I try to make crontab get the data by setting like this:
*/5 * * * * root sudo telnet localhost 8651 > /test/test.txt
The output file will be incomplete, for example:
3263 2012-07-13 09:28 FromCrontab.txt 44833 2012-07-13 08:14 CorrectOne.txt
The CorrectOne.txt file contain 44833 chars, but the output file from Crontab contains only 3263 chars.
I've tried to solve this by using "tea":
sudo telnet localhost 8651 | tee -i /test/test.txt
or change the SHELL:
SHELL=/bin/sh or SHELL=/bin/bash
neither one could help.
I'm new to Ubuntu and not I'm not familiar with crontab or telnet. Hoping someone could help me solve this problem or give me some direction for studying.