psauxlog(8)
π psauxlog(8) β like, the process list but with a timestamp, bestie π
okay so you found the psauxlog page from the ClusterTools2 crew and honestly? it's giving "small script, big main character energy." stay with me, we're gonna go through it together π«Ά
β¨ NAME β¨
psauxlog β logs the process list, but with a timestamp, because context is everything π
π¦ SYNOPSIS π¦
psauxlog [ logfile ]
πΈ DESCRIPTION πΈ
psauxlog logs the process list with a timestamp. basically, the script is out here putting the output of date +%F %T in front of each line of the output of ps aux. that's it. that's the whole vibe. β
and like, if you need more data than that? pidstat could be the right choice, no cap. π
π EXAMPLES π
lowkey the best part, let's go πββοΈ
- Run
psauxlogevery 10 minutes. the crontab entry could look like this:
-04-59/10 * * * * root /usr/sbin/psauxlog /var/log/psaux.log
- Rotate and compress the log from time to time. the logrotate entry could look like this:
/var/log/psaux.log {
compress
dateext
maxage 365
rotate 99
size +4M
notifempty
missingok
copytruncate
}
- Show processes waiting on IO. use the default logfile:
# awk '$10~/D/' /var/log/psaux.log
- Show zombie processes. π§ββοΈ use the default logfile:
# awk '$10~/Z/' /var/log/psaux.log
- Show processes existing at a certain time, e.g.
2021-09-27 07:01. use the default logfile:
# awk '$1~/2021-09-27/&&$2~/^07:01:/' /var/log/psaux.log
- Show when a certain process did exist, e.g
sapstartsrv. use the default logfile:
# awk '$13~/sapstartsrv/' /var/log/psaux.log
- Show processes using more than a certain CPU percentage, e.g.
100%. use the default and all compressed logfiles:
# less /var/log/psaux.log* | awk '$5>100'
- Show processes of a certain user using more than a certain CPU percentage. e.g. SAP
<sid>admof SIDHA1using more than50%. use the default and all compressed logfiles:
# less /var/log/psaux.log* | awk '$3="ha1adm"&&$5>50'
ok bestie, that last one is literally copied character-for-character, single = and all β don't come for me, I'm just the messenger π
π EXIT STATUS π
0β successful program execution. we love a clean exit β¨>0β usage, syntax or execution errors. π
π§ FILES π§
/usr/sbin/psauxlogβ the script itself/var/log/psaux.logβ the default logfile/etc/cron.d/ClusterTools2β the cron entry/etc/logrotate.d/ClusterTools2β the logrotate entry
π BUGS π
feedback is welcome, please mail to feedback@suse.com . they're literally asking, so likeβ¦ tell them π«Ά
π SEE ALSO π
ps(1), pidstat(1), crontab(5), systemd.timer(5), logrotate(8), ClusterTools2(7), ClusterTools2-timer(7)
π COPYRIGHT π
(c) 2011-2021 L.Pinne, Germany.
psauxlog comes with ABSOLUTELY NO WARRANTY. for details see the GNU General Public License at http://www.gnu.org/licenses/gpl.html
ngl the all-caps "ABSOLUTELY NO WARRANTY" is the loudest thing on this whole page and I respect it π
and that's the tea, bestie β this page is psauxlog(8) from ClusterTools2, dated 24 Sep 2021. go forth, log your processes, slay π
π
π¦ where this page comes from
- opensuse-leap 16.0: ClusterTools2 3.1.3-160000.2.2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms