LVOware
PRATTICO Consulting
Sunday May 27, 2012
Home
Search
Advanced Search
Category Search
Affiliates
Acknowledgements
Cool Links
Username
Password
Remember me
Forgot your password
?
Create an account
Who's Online
We have 20 guests online
Newest Member
beyondimagem
Hit Counter
9133554 Visitors
cool Statistics
coolcommands:
1330
Categories:
83
Total queries:
595500
Members:
16437
Category Search coolcommands.com
Select Category:
AIX
AIX Hardware Components
AIX Logical Volume Manager (LVM)
apache
Application
ASM
awk
Backup/Restore
bash
Checkpoint Firewall-1
coolscripts
CPU
DB2
Disk
DST
EMC
Environment
Epoch Time
File
Filesystem
Firmware
FTP
General UNIX
HACMP
Hitachi
HMC
HP/UX
HTTP
IBM
Infoprint Manager
IRIX
Java
Kerberos
Kernel
KSH
Linux
LPAR
Mail
Memory
MySQL
nawk
Network
NFS
NIM
Open Source Tools
Oracle
Performance Testing
Perl
PHP
postfix
Print
Process
Python
RDAC
Relational Databases
robot
RS/6000
Samba
Security
sed
Sendmail
Service Update Management Assistant
Shell
Software Packaging
Solaris
Solaris Volume Manager (SVM)
Solstice Disksuite
SPARC Storage Array (SSA)
SSH
Storage SAN
Sun Cluster
Sybase
TSM
TWS
Veritas Volume Manager (VXVM)
VI
VIO Server
VMware
WebMethods
WebSM
Websphere Application Server (WAS)
Websphere MQ
XWindows
Submitted by: lvo  
coolcommand
lsof - how to list open files
Description
To list all open files:
# lsof
To list all open files on a device:
# lsof /dev/hd4
To see which tcp ports are listening on a server for a specific process id:
# lsof -p pid | grep -i tcp
To see listing of files open for a specific ip or port:
# lsof -i :[hostname|ip address][:service|port]
Exemple to find who is listening on port 18011:
# netstat -an | grep 18011 | grep LIST
tcp4 0 0 172.26.25.167.18011 207.96.246.57.53445 ESTABLISHED
tcp4 0 0 *.18011 *.* LISTEN
# lsof -i:18011
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
swora81 144574 root 6u IPv4 0x71910adc 0t0 TCP *:SL_18011 (LISTEN)
swora81 144574 root 11u IPv4 0x72022adc 0t0 TCP server1:SL_18011->server2:53445
(ESTABLISHED)
oracle 711808 daemon 11u IPv4 0x72022adc 0t0 TCP server1:SL_18011->server2:53445
(ESTABLISHED)
oracle 711808 daemon 21u IPv4 0x7244dadc 0t0 TCP server1:SL_18011->server2:53409
(CLOSE_WAIT)
Example
lsof -p 12000 | grep -i tcp
Return to search results
Random coolcommands
coolcommand: oslevel - to find level of IBM AIX
Example: oslevel
[show me the details]
coolcommand: how to determine of your file name has a space at the end
Example: ls | od -b
[show me the details]
coolcommand: how to identify which package a file belongs to in Sun Solaris
Example: /usr/sbin/pkgchk -l -p /usr/bin/ls
[show me the details]
coolcommand: csplit or split - split a large file into smaller ones
Example: csplit file keyword
[show me the details]
coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts
myPMS
Password
Management
System
by
Top 5 Submitters
lvo
1152
audet
37
kah00na
32
Mariom
24
lebjf000
14
Top 5 Searches
Category Solaris
49379
Category AIX
46267
Category General UNIX
43933
solaris
22927
aix
22116
Terms of Use
Privacy
Contact
coolcommands.com © 2012. All Right Reserved.
Programming by
PRATTICO Consulting
.
Hosting by
Apricusum