Sobes.tech
Middle

How to find a process that periodically runs on a server (not as a systemd unit)?

sobes.tech AI

Answer from AI

To find a process that periodically runs on the server but not as a systemd unit, you can:

  1. Check task schedulers:
    • crontab -l for the current user and sudo crontab -l for root.
    • Files in /etc/cron.* and /var/spool/cron/.
  2. Use ps or top to monitor processes and look for recurring launches.
  3. Check scripts and tasks in at (atq for the list).
  4. Use auditd or systemtap to track process launches.
  5. Check logs, such as /var/log/syslog or /var/log/messages, for entries about process launches.

Example command to search in cron:

grep -r '' /etc/cron* /var/spool/cron
How to find a process that periodically runs on a… - sobes.tech