...
Code Block |
---|
voyage:~# netstat -nlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2830/portmap tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3062/apache tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 6063/dnsmasq tcp 0 0 0.0.0.0:1723 0.0.0.0:* LISTEN 3006/pptpd tcp6 0 0 :::53 :::* LISTEN 6063/dnsmasq tcp6 0 0 :::22 :::* LISTEN 6032/sshd udp 0 0 0.0.0.0:53 0.0.0.0:* 6063/dnsmasq udp 0 0 0.0.0.0:67 0.0.0.0:* 6063/dnsmasq udp 0 0 0.0.0.0:111 0.0.0.0:* 2830/portmap udp6 0 0 :::53 :::* 6063/dnsmasq Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path |
Finding things
The data is kept in voyage:~# ls -l /usr/local/share/pinger/data/
total 3404
rw-rr- 1 root staff 3480630 May 18 17:31 ping-2009-05.txt
voyage:~# date
Mon May 18 21:43:31 GMT 2009with files of the form ping-yyyy-mm.txt where yyyy is the year and mm the month (1-12).
Code Block |
---|
voyage:~# ls \-l /usr/local/share/pinger/data/
total 3404
-rw-r{-}{-}r-\- 1 root staff 3480630 May 18 17:31 ping-2009-05.txt
voyage:~# date
Mon May 18 21:43:31 GMT 2009 |
Code Block |
h3. Finding things
The data is kept in /usr/local/share/pinger/data/ with files of the form ping-yyyy-mm.txt where yyyy is the year and mm the month (1-12).
|
The CGI scripts are kept in /usr/lib/cgi-bin:
Code Block |
---|
voyage:~# ls \-l /usr/lib/cgi-bin total 72 \-rwxr-xr-x 1 root root 15101 Jan 7 2000 cgi-lib.pl \-rwxr-xr-x 1 root root 20101 May 15 23:17 ping_data.pl \-rwxr-xr-x 1 root root 36226 May 12 22:00 traceroute.pl |
...
Edit /etc/crontab and save. then reboot to make the new version take effect (alternatively use kill -HUP <PID>, where you can find the PID from the ps ux command to restart the crontab process ).
Logs
The log is kept in /var/log/messages. We believe this "rotated" (compressed, saved and deleted) automatically by syslog using /etc/logrotate.conf and /etc/syslog.conf, so memory is not eventually exhausted.
...
To find out how much memory is available in the file system, use df -k:
Code Block |
---|
voyage:~# df \-k Filesystem 1K-blocks Used Available Use% Mounted on rootfs 3853536 249880 3407904 7% / udev 10240 20 10220 1% /dev /dev/disk/by-label/ROOT_FS 3853536 249880 340790410220 7%1% /dev /dev/disk/by-label/ROOT_FS 3853536 249880 3407904 7% / /dev/disk/by-label/ROOT_FS 3853536 249880 3407904 7% /dev/.static/dev tmpfs 128416 0 128416 0% /lib/init/rw tmpfs 128416 0 128416 0% /dev/shm tmpfs 8192 412 7780 6% /rw |
...
Code Block |
---|
voyage:~# apt-get update Get:1 [http://security.debian.org] etch/updates Release.gpg [197B] Hit [http://security.debian.org] etch/updates Release Ign [http://security.debian.org] etch/updates/main Packages/DiffIndex Hit [http://security.debian.org] etch/updates/main Packages Get:2 [http://www.voyage.hk] ./ Release.gpg [189B] Hit [http://www.voyage.hk] ./ Release Ign [http://www.voyage.hk] ./ Packages/DiffIndex Ign [http://www.voyage.hk] ./ Packages Hit [http://www.voyage.hk] ./ Packages Get:3 [http://ftp.hk.debian.org] etch Release.gpg [394B] Hit [http://ftp.hk.debian.org] etch Release Ign [http://ftp.hk.debian.org] etch/main Packages/DiffIndex Hit [http://ftp.hk.debian.org] etch/main Packages Fetched 3B in 6s (0B/s) Reading package lists... Done |
...