Identify boot ,shutdown or reboot in linux shell script yocto linux

cancel
Showing results for 
Search instead for 
Did you mean: 

Identify boot ,shutdown or reboot in linux shell script yocto linux

152 Views
Contributor II

Hi,

In my current project I need to identify running jobs for detecting the system is in reboot or shutdown level.

Using systemctl I knows how to identify the jobs. But in Digi yocto linux i could not find systemctl .Please let me know how can I identify in linux script whether the system is in boot , restart or shutdown level.

Thanks & Regards

Vijith G

Labels (4)
0 Kudos
2 Replies

72 Views
NXP Employee
NXP Employee

Hi vijith G,

 Different yocto version has big change.Can you tell me the yocto version you used?

Regards,

zhiming

0 Kudos

72 Views
Senior Contributor II

Hi vijith G,

Are you trying to get the run-level of the system?

For that you can try using below commands:

$ runlevel

or

$ who -r

Regards,

Karan Gajjar