Sponsored Content
Top Forums Shell Programming and Scripting netstat command to be executed for list of hosts Post 302867589 by Yoda on Thursday 24th of October 2013 12:53:01 PM
Old 10-24-2013
Use ssh to remotely run the command:
Code:
#!/bin/ksh

while read name ipaddr
do
        ssh -n "$ipaddr" "netstat -i" 2> /dev/null | while read name mtu netdest addr ipkts ierrs opkts oerrs collis queue
        do
                [ "$name" = "Name" ] && continue
                [ $ierrs -gt 0 ] && print "Error message here"
                [ $oerrs -gt 0 ] && print "Error message here"
        done
done < "$Serverlist"

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

netstat command between clustered hosts

I have 2 clustered hosts, is it possible for me to issue a netstat command against 1 host from the other ? (4 Replies)
Discussion started by: murphyboy
4 Replies

2. UNIX for Advanced & Expert Users

Netstat command

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)
Discussion started by: nagalenoj
3 Replies

3. Cybersecurity

Help Required: Command to find IP address and command executed of a user

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)
Discussion started by: loggedout
2 Replies

4. UNIX for Dummies Questions & Answers

Netstat command query

hy guys, I did netstat and it is listening, what can i do from the client side that to see if the port is open? Regards Charneet (1 Reply)
Discussion started by: charneet
1 Replies

5. Solaris

Check executed commands from remote hosts

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)
Discussion started by: @dagio
8 Replies

6. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

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)
Discussion started by: 4dirk1
4 Replies

7. Shell Programming and Scripting

netstat command

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)
Discussion started by: dips_ag
5 Replies

8. UNIX for Dummies Questions & Answers

Need help with a netstat command

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)
Discussion started by: SIFT3R
6 Replies

9. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

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)
Discussion started by: mac4rfree
2 Replies

10. UNIX for Dummies Questions & Answers

List commands executed on a server

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)
Discussion started by: nanz143
6 Replies
ib_read_bw(1)							   User Commands						     ib_read_bw(1)

NAME
ib_read_bw - RDMA read bandwidth test SYNOPSIS
ib_read_bw [ options ] [ server IP address ] DESCRIPTION
This program tests the bandwidth of RMDA read transactions. OPTIONS
-p, --port=<port> listen on/connect to port <port> (default: 18515) -m, --mtu=<mtu> mtu size (default: 1024) -d, --ib-dev=<dev> use IB device <dev> (default: first device found) -i, --ib-port=<port> use port <port> of IB device (default: 1) -s, --size=<size> size of message to exchange (default: 1) -a, --all run sizes from 2 till 2^23 -t, --tx-depth=<dep> size of tx queue (default: 50) -n, --iters=<iters> number of exchanges (at least 100, default: 1000) -C, --report-cycles report times in cpu cycle units (default: microseconds) -H, --report-histogram print out all results (default: print summary only) -U, --report-unsorted (implies -H) print out unsorted results (default: sorted) -V, --version display version number AUTHOR
Guy Coates < gmpc@sanger.ac.uk > perftest February 20, 2008 ib_read_bw(1)
All times are GMT -4. The time now is 01:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy