01-23-2006
Quote:
Originally Posted by pascalbout
hello
I need for a script to capture the ip address from the connected user.
I have 5 logical partitions.
With "who", i have the ip adress, but only for 2 servers.
Do you know another command to know the ip address of connected clients ?
thank you
See if 'netstat -a|grep ESTABLISHED' gives you what you want.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello
I need to show my MAC-Adress on a Unix System, is there someone that know how? (2 Replies)
Discussion started by: nkochr
2 Replies
2. Solaris
Hello together
how can I find a ipadress from a login into remote system console?
Thanks a lot
Urs (1 Reply)
Discussion started by: MuellerUrs
1 Replies
3. HP-UX
I want change my IP address and hostname in my machine by use the console. Can any one tell me how can I execute that by command ?
Thanks & Regards (1 Reply)
Discussion started by: magasem
1 Replies
4. OS X (Apple)
hello,
I need to obtain the Mac Adress and write him in a file.
I'm trying to do this with a command in crontab, with ifconfig, but it's only possible do this if i disabled the password for run the command, but than i have security problems.
I'm searching for a script (.sh) that allows me to... (5 Replies)
Discussion started by: Pedro Almeida
5 Replies
5. Shell Programming and Scripting
Hi,
I need to find out the repeated IP address from the apache log file from my box. I did try to come out with the script, but I could not grep out the repeated Ip Address from the error_logs and need to redirect to a file. Can you guys please help me out of this problem.
Thanks in... (9 Replies)
Discussion started by: gsiva
9 Replies
6. IP Networking
well i'm trying to change the ip adress on an old alphaserver runing tru64 4.0F using the
ifconfig hme0 IP_ADDRESS mask MASK broadcast BROADCAST
and when i check it using ifconfig -a it shows the new ip and all is well
but when the server is rebooted it reverts back to the old ip (3 Replies)
Discussion started by: randUSR()
3 Replies
7. Shell Programming and Scripting
This is probably a real n00b question but i`m not able to figure it out.
I have a folder of configuration files that contain IP-adresses. The line i`m interested in looks like this:
IP_ADDRESS="123.123.123.1123"
Some have muliple ip adresses, so the line will look like :
... (5 Replies)
Discussion started by: DaneV
5 Replies
8. Shell Programming and Scripting
Hi All,
I have a file which is "|" pipe delimited. The file has 3 fields. the last field contains email ids which has different host names.
I want to sort the file based on host name, which is in 3rd filed and needs to create a file for each host.
For example, if out of 1000 records, 10... (6 Replies)
Discussion started by: ace_friends22
6 Replies
9. IP Networking
Hello, I have a problem of routing traffic on two virtual interfaces I have created on my machine (CentOs6)
By using tunctl I created two virtual interfaces tap1 and tap2
let s imagine I gave them two different address
tap1: 10.1.1.1 net 255.255.255.0
tap2: 10.1.2.1 net 255.255.255.0
... (0 Replies)
Discussion started by: nicandro
0 Replies
10. UNIX and Linux Applications
Hello, hopefully somebody can give me a clue on how to do this.
Right now I have emails coming from company1-alert@company1.com to distribution@ourcompany.com.
I want to set up something in Postfix so that if the email is going to distribution@ourcompany.com, the From: address is... (2 Replies)
Discussion started by: TayKimchi
2 Replies
FSTAT(8) System Manager's Manual FSTAT(8)
NAME
fstat - file status
SYNOPSIS
fstat [ -u user ] [ -p pid ] [ filename... ]
DESCRIPTION
Fstat identifies open files. A file is considered open if a process has it open, if it is the working directory for a process, or if it is
an active pure text file. If no options are specified, fstat reports on all open files.
Options:
-u Report all files open by a specified user.
-p Report all files open by a specified process id.
filename...
Restrict reports to the specified files. If the file is a block special file, fstat additionally reports on any open files on that
device, treating it as a mounted file system.
The following fields are printed
USER The username of the owner of the process.
CMD The command name of the process.
PID The process id.
FD The file number in the per-process open file table. The special names "text" and "wd" mean that the file is the pure text inode or
the working directory for the process. If the file number is followed by an asterick (*), then the file is not an inode, but either
a socket, fifo, or has an error of some kind. In this case the rest of the entry is variable format, doesn't correspond to the rest
of the headings, and is enclosed in parenthesis. The following paragraph describing sockets will explain the variable format.
DEVICE
Major minor number of the device this file exists on.
INODE The inode number of the file.
SIZE The size in bytes of the file.
TYPE The type of the file. (see sys/file.h)
Sockets The formating of open sockets depends on the protocol domain. In all cases the first field is the domain name, the second field is
the socket type (stream, dgram, etc), and the third is the socket flags field (in hex). The remaining fields are protocol dependent. For
tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb). For unix domain sockets, its the address of the socket pcb and
the address of the connected pcb (if connected). Otherwise the protocol number and address of the socket itself are printed. The idea is
not to duplicate netstat, but to make available enough information for further analysis. For example, the addresses mentioned above are
the addresses which the "netstat -A" command would print for tcp, udp, and unixdomain. Note that since pipe(2) is implemented with sock-
ets, a pipe appears as a connected unix domain stream socket. A unidirectional unix domain socket indicates the direction of flow with an
arrow ("<-" or "->"), and a full duplex socket shows a double arrow ("<->").
BUGS
Socket information clutters the output.
Since fstat takes a snapshot of the system, it is only correct for a very short period of time.
SEE ALSO
ps(1), pstat(8)
4th Berkeley Distribution December 12, 1987 FSTAT(8)