Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
procinfo
procinfo-socklist.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File procinfo-socklist.dif of Package procinfo
--- socklist.pl +++ socklist.pl 2007-06-04 11:29:53.483798422 +0200 @@ -72,7 +72,7 @@ closedir PROC; # part 2: read /proc/net/tcp, /proc/net/udp, and /proc/net/raw, # printing the answers as we go. -print "type port inode uid pid fd name\n"; +print "type port inode uid pid fd name\n"; sub scheck { open(FILE,"/proc/net/".$_[0]) || die; while (<FILE>) { @@ -87,12 +87,15 @@ sub scheck { ($cmd) = ( $l=~/Name:\s*(\S+)/ ); close(CMD); } - printf "%s %6d %10d %6d %6d %4d %s\n", + printf "%-4.4s %6d %10d %6d %6d %4d %s\n", $_[0], $a ,$F[9], $F[7], $pid, $fd, $cmd; } close(FILE); } -scheck("tcp"); -scheck("udp"); -scheck("raw"); +if (-r "/proc/net/tcp" ) { scheck("tcp" ); } +if (-r "/proc/net/tcp6") { scheck("tcp6"); } +if (-r "/proc/net/udp" ) { scheck("udp" ); } +if (-r "/proc/net/udp6") { scheck("udp6"); } +if (-r "/proc/net/raw" ) { scheck("raw" ); } +if (-r "/proc/net/raw6") { scheck("raw6"); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor