Tips

General Unix Tips

0

Here is how I fail over application account cronjobs using VCS.

Application Appx_cronjobs
(
Critical = 0ff
StartProgram = "/usr/bin/su – appxusr -c "touch ./crontab.LAST""
StopProgram = "/usr/bin/su – appxusr -c "/usr/bin/rm -f ./crontab.LAST""
CleanProgram = "/usr/bin/su – appxusr -c "/usr/bin/rm -f ./crontab.LAST""
MonitorProgram = "/usr/bin/su appsusr -c /etc/VRTSvcs/utils/vcs_cron_monitor.sh" [...]

Filed under Tips by on . Comment#

0

# A fast way to find a file du -a | grep -i
# Top 10 space users in a filesystem du -a | sort -n | tail -10

Filed under Tips by on . Comment#

0

Normally with lsof
lsof -i tcp:
I found this alternative for if lsof is not available on a server to determine the process associated with an open socket Loop through all the running processes with this command till you find it.
pfile | grep "port:"
Sorry but I think it is only available on Solaris [...]

Filed under Tips by on . Comment#