Pi check if a program is running- pidof,ps axg

Forums:

Source:https://www.raspberrypi.org/forums/viewtopic.php?t=13475

Re: How do I check if a program is running
Quote
Sat Aug 04, 2012 8:54 am

The pidof command is useful in this case.
Code: Select all

pidof no-ip
should return the process ID of the no-ip program, or nothing at all if it isn't running.

Also, when using ps you can prevent the ps command showing by enclosing one of the letters of the name in square brachets
Code: Select all

ps axg | grep [n]o-ip

44.4968817,101.0329761,05-20-2019 01:51:24 AM,!Eating lunch