Can't tell whether lsof -i connections are coming in or going out
os x 10.6.6 ,GNU bash, version 3.2.48
I am working on a bash script that displays the IP address of the computer that I am connected to with skype. I have that working pretty well, but only because I know the incoming connection port skype uses.
I used lsof -i and grep for the port and application name
I am wondering how I can tell which connections are incoming and which are outgoing(or do they go both ways?). I see the -> ,but not any <- . Here is a portion of my lsof -i output:
I'm pretty sure I'm missing something. Thanks for any suggestions
hello
Sorry but i don't understand very well the lsof command with the man.
Can you explain to me what is the use of this command ?
thank you (2 Replies)
Hi All,
I'm having a problem with "lsof" in HP-UX system. Its giving me 2 two different results when running it.
1 . lsof -p 'PID' | wc -l -----gives some value
2 . lsof | grep 'PID' | wc -l
The above two commands gives me two different values with the same PID......
Thanks (6 Replies)
Hi ..
I have written a cronjob to invoke a script that would transfer files based on some criteria.
Consider folders A and B. Say I FTP a large file to A. Before the file gets fully transfered say the cronjob gets invoked. The script will move the file before its fully transfered. To detect... (1 Reply)
I'm looking to list all of the files open at a certain time up on a UNIX box.
From looking on the internet, it looks as though lsof is the most common.
However have tried this and got the following:
ksh: lsof: not found
Now having gone into bash mode and hit tab twice I see that lsof... (3 Replies)
Hi,
I typed lsof -i :80 in my putty but i am not able to get sockets related to port 80
Can any one help me out soon
Can anyone point out the reason for not able to get the related sockets
Output of what i am getting in my putty is displayed below
training@use:~> lsof -i :80... (4 Replies)
In Linux and Solaris lsof accepts the -X switch which allows to see if deleted files are still in use and eat disk space. In HP-UX it is now working and it is a problem... today one of my filesystems on the server was increasing very fast but existing file sizes were not really changing. lsof shows... (3 Replies)
Hi,
I am trying to find the files in a specific directory that are currently in open state. I need this information to archive the old files that are not active in the directory.
I get the following output when I try the command $ lsof +d '/var/tmp/'|awk '{print $9}'|sort -u
NAME... (1 Reply)
Discussion started by: ryzen7
1 Replies
LEARN ABOUT XFREE86
pldd
PLDD(1) Linux User Manual PLDD(1)NAME
pldd - display dynamic shared objects linked into a process
SYNOPSIS
pldd pid
pldd option
DESCRIPTION
The pldd command displays a list of the dynamic shared objects that are linked into the process with the specified process ID. The list
includes the libraries that have been dynamically loaded using dlopen(3).
OPTIONS
-?, --help
Display program help message.
--usage
Display a short usage message.
-V, --version
Display the program version.
EXIT STATUS
On success, pldd exits with the status 0. If the specified process does not exist, the user does not have permission to access its dynamic
shared object list, or no command-line arguments are supplied, pldd exists with a status of 1. If given an invalid option, it exits with
the status 64.
VERSIONS
pldd is available since glibc 2.15.
CONFORMING TO
The pldd command is not specified by POSIX.1. Some other systems have a similar command.
NOTES
The command
lsof -p PID
also shows output that includes the dynamic shared objects that are linked into a process.
The gdb(1) info shared command also shows the shared libraries being used by a process, so that one can obtain similar output to pldd using
a command such as the following (to monitor the process with the specified pid):
$ gdb -ex "set confirm off" -ex "set height 0" -ex "info shared"
-ex "quit" -p $pid | grep '^0x.*0x'
BUGS
Since glibc 2.19, pldd is broken: it just hangs when executed. It is unclear if it will ever be fixed.
EXAMPLE
$ echo $$ # Display PID of shell
1143
$ pldd $$ # Display DSOs linked into the shell
1143: /usr/bin/bash
linux-vdso.so.1
/lib64/libtinfo.so.5
/lib64/libdl.so.2
/lib64/libc.so.6
/lib64/ld-linux-x86-64.so.2
/lib64/libnss_files.so.2
SEE ALSO ldd(1), lsof(1), dlopen(3), ld.so(8)COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU 2017-09-15 PLDD(1)