There's an easier way to configure remote syslogging that is even supported by VMware.
Within the VIC, select the ESXi server, then the "Configuration" tab. From there, choose "Advanced Settings" and look for "Syslog" in the left-hand tree. Enter your syslog destination within the setting "Syslog.Remote.Hostname". Click OK and verify logs are making it to your destination properly.
You can find the equivalent information in slightly uglier form (a.k.a. hexadecimal) in /proc/net/tcp
. There, you can find the inode of the connection, which you can look up under /proc/$pid/fd/
.
For example:
$ cat /proc/net/tcp
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode
0: 00000000:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 6115 1 f5adc4c0 300 0 0 2 -1
...
(In normal netstat, but not in busybox netstat, the -e
option also gives you that extra information.)
You can find the process which corresponds to the inode with the following command:
# for x in $(find /proc/ | grep /fd/); do ls -la $x 2>/dev/null done | grep 6115
...
lrwx------ 1 root root 64 7 jan 22.50 /proc/2560/fd/3 -> socket:[6115]
You need root access for the second step.
Not as convenient as the -p
option, obviously, but works in a bind. Could be scripted, if necessary.
Best Answer
Busybox can be compiled with
ENABLE_FEATURE_PS_ADDITIONAL_COLUMNS
which will enablenice
among others. Then you can do, for example:POSIX
ENABLE_FEATURE_PS_TIME
ENABLE_FEATURE_PS_ADDITIONAL_COLUMNS
Non-POSIX
ENABLE_SELINUX