I can modify the script but i dont know how to ssh remotely and generate a mai lreport regarding this disk space as I am a newbie to UNIX. but plz if u have nay idea on this how to do..plz post here or PM me ASAP
I can modify the script but i dont know how to ssh remotely and generate a mai lreport regarding this disk space as I am a newbie to UNIX. but plz if u have nay idea on this how to do..plz post here or PM me ASAP
Please, stay away from using "leet" abbreviations: if you want us to write whole scripts for you, you surely can undergo the effort to write "you" instead of "u" and "please" instead of "plz", yes?
Back to your problem: you should really learn how to work with ssh in a distributed environment. First, make sure all the ssh-keys are exchanged. In the following i will call the central machine from where you want to work the "server" and the others where you want to collect data from the "clients". On the server generate a public SSH key (use "ssh-keygen") WITHOUT a password.
CAUTION: if there is already one such key issuing "ssh-keygen" will invalidate it, therefore check if there isn't already one and skip this if there is.
Then log in to one client after the other and distribute this key. Copy the contents of "~/.ssh/id_rsa.pub" on the server to "~/.ssh/authorized_keys" on the client.
Now test the connection by issuing on the server (output should look alike):
This executes the "date" command on the client and directs the output of it to th server.
The content of the file ~/.ssh/authorized_keys on the client should look like this:
Now distribute the script to every one of these clients. I will assume in the following that it is stored under "/admin/scripts/ygor-script.sh" on the clients.
Prepare a file with a list of clients/users on the server, like the following (the user names could be the same or different, doesn't matter):
Then issue the following command on the server:
And your script should be executed on all the clients.
i have 3 servers and i am checking for the disk space of a specific mount-point, should not be more than 85 %
considering example as below
server1 mountpoint_1 has 70% diskutilization
server2 mountpoint_1 has 80% diskutilization
server3 mountpoint_1 has 7% diskutilization
now when it... (6 Replies)
Running this code
df -h | head -2 | awk '{print $8}'
Gives me the following output:
%iused
6%
What I'm trying to do is get the 6% but I'm having trouble doing this using cut -c, I think that this could be because the text is on different lines; is there a way of doing this? (8 Replies)
Hi,
I am working on Sun Solaris 5.10 and want to direct the output from a disk space check script to an output file;
#!/bin/bash
CURRENT=$(df -k /log/logs | grep /log/logs | awk '{ print $5}' | sed 's/%//g')
THRESHOLD=30
if ; then
echo "Remaining free space is low" > output.txt
else... (10 Replies)
Hi All,
Hope all are doing good!! Am glad that i have utilized some ideas and written a code to make the disk space result comes better and it was successfully running in the production. The next update from my manager was to make this code to come in a table format with color added.
1)... (28 Replies)
I am very new to unix and Linux, So I have a question about LINUX and AIX.
What LINUX and AIX commands can be used to get the following output:
071912 GB blocks Free %Iused Mounted on
071912 5.00 4.64 8% /
071912 15.00 9.44 38% /usr
071912 6.00 2.56 58% /var
071912 15.00 12.88 15% /tmp... (1 Reply)
Hi Experts,
I want to get my shell script output in a color for a particular word. PFB my output.
TT.QM.JTV1S1 TLORSBT2.JMR701T1.C1 REPOS
TT.QM.JTV1R1 TLORSBF2.JMR701T1.C1 NORMAL
whenever REPOS word comes then entire line should come in red color. Can you please help me... (4 Replies)
do you have any simple script on how to change the color and font of a string in a script example
echo "===================================="
echo " sample color script"
echo "===================================="
echo " hello "
echo " bye"
on hello,... (3 Replies)
:( Hi All,
i have 4 linux server for which i want set up script to monitor the disk space ...
here my problem is i want the output like graph...
also it should reflect in monitor ...as non stop process..
can any one suggest me any way where i can implement the script?
... (3 Replies)
Hi all,
Can any one help me in making a disk space script in solaris 8/9
for instance i only want to get those partitions whose diskspace has exceed 70%.
Any volunteer?
Cheers!
BR/asad (8 Replies)