Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Meaning of systemctl status output

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Meaning of systemctl status output

#1 Post by PsySc0rpi0n »

Hello.

I have some questions that seems conffusing in the output of

Code: Select all

systemctl status myApp
In this case is:

Code: Select all

systemctl status tor
I get the following output:

Code: Select all

$ systemctl status tor
● tor.service - Anonymizing overlay network for TCP (multi-instance-master)
   Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor preset: enabled)
   Active: active (exited) since Sat 2021-03-20 21:25:00 WET; 7min ago
  Process: 3645 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
 Main PID: 3645 (code=exited, status=0/SUCCESS)
But, apparently, tor is not running, judging by "ps aux | grep tor" output.

So, if it is not running, why systemctl status says " Active: active (exited)...." ?? And also, if it is not running why it shows a PID? This makes no sense to me!
Then it also says "code=exited, status=0/SUCCESS)". So, if for some reason tor failed to start, why it says SUCCESS???

arid
Posts: 136
Joined: 2014-05-08 18:40
Location: Aridzona
Has thanked: 3 times
Been thanked: 1 time

Re: Meaning of systemctl status output

#2 Post by arid »

Semantics :mrgreen:

This is mine and looks good to me.

Code: Select all

● tor.service - Anonymizing overlay network for TCP (multi-instance-master)
     Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sat 2021-03-20 18:34:56 EDT; 2h 7min ago
    Process: 596 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 596 (code=exited, status=0/SUCCESS)
        CPU: 1ms
The tor daemon starts when you boot up.

Let's see your ps aux | grep tor.

Mine says it's running as it should be.

Code: Select all

$ ps aux | grep tor
root         251  0.0  0.0      0     0 ?        S    18:34   0:00 [usb-storage]
root         277  0.0  0.0      0     0 ?        S    18:34   0:00 [usb-storage]
debian-+     715  0.0  0.3  30404 26176 ?        Ss   18:35   0:00 /usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f 
         4512  0.0  0.0   6180   656 pts/0    S+   20:47   0:00 grep tor
None of this has anything to do with if you're actually using tor.

What I meant by "semantics" is that you can have positive (+) (yes) (start) and negative (-) (no) (stop) = success.
There's no drama in my sid......

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Meaning of systemctl status output

#3 Post by Head_on_a_Stick »

arid wrote:Let's see your ps aux | grep tor
No need for the pipe:

Code: Select all

pgrep -a tor
PsySc0rpi0n wrote:why systemctl status says " Active: active (exited)...." ?? And also, if it is not running why it shows a PID? This makes no sense to me!
Check what the service actually does by examining the "ExecStart" line(s) in the unit file:

Code: Select all

systemctl cat tor.service
In the case of tor I think the daemon is started by the /lib/systemd/system/tor@.service & /lib/systemd/system/tor@default.service instance units.

Check if they are running by examining the unit tree:

Code: Select all

systemctl status
Or use

Code: Select all

systemd-cgtop
deadbang

Post Reply