Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-22-2009, 09:36 AM   #1
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Wheezy/Jessie Stable, Windoze 7
Posts: 593

Rep: Reputation: 36
Show list of running tasks from services / init.d in Debian / Ubuntu?

Hi there

I am currently creating a powersave program that is pretty simple:

Make a list of services / init.d "services" that are running, shut them down via init.d scripts (the proper way) for power save and then (since the list was saved) restart them later again.

I have tried this out and there is a lot of watts to save.

But how can I figure out which init.d services are running currently?
most init.d scripts under Debian / Ubuntu don't offer a status function (running / not running)

Is there a standardized way these services and servers log themselved in some directory so that I can know that they are running?

I can of course see a list of them running with ps, but not from which init.d script they originated.


Old 01-23-2009, 05:00 AM   #2
Senior Member
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
This isn't foolproof, but you may be able to adapt it to your needs ... A lot of services will write a /var/run/*.pid file. In many case the asterisk (*) will be the name of the file in /etc/init.d. Sadly, this is not always the case.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show what services are running? lewkh Debian 8 07-22-2014 09:30 AM
Seeing which services are running on debian and identifying which I can remove Maverick1182 Debian 2 01-12-2009 09:31 AM
How do I get a list of services running on my computer? imsam Linux - Newbie 4 10-27-2004 12:59 AM
newbie: how to see see what services my machine is running under init.d ? sirpelidor Linux - Newbie 2 06-24-2004 02:20 PM
Command to show services running? AMDPwred Linux - General 12 03-03-2002 11:59 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:23 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration