netstat launch at system startup (continued)
after i did this startup item thing, i soon noticed that it does not work properly:
for some strange reason, the command
so, i went back to my good ol' cron jobs and added the netstat command, too:
this means, that any instance of netstat will be killed at the indicated intervall with the command
adding the netstat command to the crontab would have the inconviency that it is not actually startet at system startup, but:
for some strange reason, the command
netstat will be terminated after runnning about 24h.so, i went back to my good ol' cron jobs and added the netstat command, too:
# kill the netstat process
2 0 * * * root killall netstat
# restart the netstat proc
5 0 * * * root netstat -i -w 60 >> /Library/Logs/netstat.log &
2 0 * * * root killall netstat
# restart the netstat proc
5 0 * * * root netstat -i -w 60 >> /Library/Logs/netstat.log &
this means, that any instance of netstat will be killed at the indicated intervall with the command
killall, in contrast with kill you don't give a PID as argument, but a name (or also half a name). any process matching this pattern will be killed, so handle this command with care. as an additional security measure you have to have root rights to execute killall.adding the netstat command to the crontab would have the inconviency that it is not actually startet at system startup, but:
- i do not reboot my server a lot, actually rather never, so i wouldn't care
- i did not yet remove the startup item. at boot, it is started, and the next midnight it is killed, and the crontab takes over seamlessly



