Need to run the netstat -i command on the list of hosts and check if "Ierrs" and "Oerrs" has value greaterthan 0.
for Ex: below output, driver bge1 and bge3 has Oerrs and Ierrs value > 0, So, script should report saying
"Netstat status for $host, driver bge1 has Oerrs = 20, Failed"
"Netstat status for $host, driver bge3 has Ierrs = 10, Failed"
Netstat -i ouptut :
main script :
Serverlist file has 2 hosts ip address/name
Problem is am facing is, i don't know how to run this script or netstat command on each hosts listed in serverlist file.
Am running this main script from management server which has access to all the hosts which are listed in serverlist file.
Thanks Yoda. Really SSH trick works but only concern is that, is there way through script itself we can enter "yes" on times when its prompt from some server..
am talking about handling this when we do SSH to some host :
Can you tell me how can i skip firs line(which is headerline) and the last line(blank line) while reading netstat -i command, otherwise i get "unary operator expected error" when it's evaluating if conditions for ierrs/oerrs for headerline.
Last edited by Optimus81; 10-25-2013 at 12:10 PM..
Hi All, how to list all the commands executed by users on a linux server.... I dont have access to others .bash_history. and i am not root user.. Please help.. Thanks in advance.. (6 Replies)
Hi Guys,
I like to output every command executed in the script to a file.
I have tried set -x which does the same.
But it is not giving the logs of the child script which is being called from my script.
Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Do I have this command correct to show all current connections/sessions my Solaris box has? It does not seem to do anything.
netstat -an | grep EST (6 Replies)
Hi,
In my project we use sftp with batch mode (password less) script in parallel for 14 sessions which connects to 2 different servers alternatively i.e. 7 connects to one server say server1 and the other 7 connects to say server 2.
Now the problem is that these 14 sessions are run in... (5 Replies)
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
Hello,
Is there any way to check which user and from which IP executed a command to the server.I need something like the history but with information also from which IP the command executed.
Thanks in advance (8 Replies)
Hi,
I am trying to write a script which would figure out who has run which command and their IP. As i dont have any clue as to which commands would do this job, i request some gurus to help me on this.
Thanks
Vishwas (2 Replies)
Hi..,
Now, I am reading about the netstat command and its implementation. I have doubts in some options and its functionalities,
natstat - M (Which is described as display masqueraded connections), what it means?
What is Forwarding Information Base.?(--fib)
Thanks in advance,... (3 Replies)