Archive for April, 2009

Bash: Input from multiple files.

exec 3<$1 4<$2 while read file1 <&3 && read file2 <&4 do code
done

Rsyslog: remote logging

On the client you want to log from:
vi /etc/rsyslog.conf

*.* @RemoteSyslogIPAddress:Port

Example:
*.* @172.18.1.50:514

On the remote logging server:
vi /etc/rsyslog.conf

# Begin – Allow remote logging
$ModLoad imudp.so
$UDPServerRun 514
# End – Allow remote logging

Need to send a HUP to the rsyslogd process or

service rsyslog reload

Protected: MacOSX: Connecting to a Cisco router/switch.

This content is password protected. To view it please enter your password below:

Usefull lsof options

Various useful lsof options:

To view files open by a particular PID:
lsof -p pidnumber

To show processes and the port they are running on. This is a great command to find out not only process and port, but also the command and the PID.:
lsof -i -nP # The -n does not resolve the IP addresses and ports to names.

Source: http://sial.org/howto/debug/unix/lsof/

Return top

INFORMATION