How to display all daemon processes in priority order?


 
Thread Tools Search this Thread
Operating Systems Linux How to display all daemon processes in priority order?
# 1  
Old 04-03-2014
How to display all daemon processes in priority order?

Hi,

Is there any way to run chkconfig --list and to display all daemon processes in PRIORITY order, not in alphabetic order?

Thank you.
# 2  
Old 04-03-2014
command OS specific, moved to linux...
# 3  
Old 04-04-2014
I don't believe there is a way to do this with the chkconfig command, but you could try listing and sorting the contents of the /etc/rc.d/rc.*d directories to create an ordered list by priority of the daemons. The below command uses find to list all the symbolic links to the daemons, grabs the daemon name, sorts them by priority, remove any duplicates, and finally present an ordered listing by priority. This just shows the startup daemons, to do the same with the shutdown process change the uppercase S to a K.

Code:
find /etc/rc.d/ -name 'S*' -type l | awk -F/ '{sub(/^S/,"",$5);print $5}' | sort -n | uniq | sed 's/^[0-9][0-9]/& /g'

Produces a list like so:
01 reboot
01 sysstat
02 lvm2-monitor
08 ip6tables
08 iptables
10 network
11 auditd
11 portreserve
12 rsyslog
13 cpuspeed
13 irqbalance
13 rpcbind
14 nfslock
15 mdmonitor
18 rpcidmapd
19 rpcgssd
20 kdump

This User Gave Thanks to in2nix4life For This Post:
# 4  
Old 06-15-2014
I don't believe that you can do that, I've checked the man pages and haven't found anything.
This User Gave Thanks to leame For This Post:
# 5  
Old 06-16-2014
And what exactly do you mean by "priority order"?
This User Gave Thanks to fpmurphy For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to display processes which have been running for more than a X hours?

Hi, Is it possible to display processes which have been running for more than a 5hrs using a variation of the ps -ef command? Regards, Manny (5 Replies)
Discussion started by: mantas44
5 Replies

2. Shell Programming and Scripting

Scripting Help - Display Processes

Hi, I was wondering if somebody could help me as I am struggling with writing a script for a training course. Ive had to write 5 scripts and this is the last one but am struggling with this even though I understand what it is meant to do..... PROBLEM: write a script which will allow you to... (1 Reply)
Discussion started by: isxrc
1 Replies

3. Shell Programming and Scripting

How to display what processes, users have opened at a given time

Hello, What i have to do is make a top 10 list of users sorted by the number of processes opened at a given time. Can anyone help me with finding out for a given moment, for all users how many processes each had opened? (5 Replies)
Discussion started by: gabibyte
5 Replies

4. Ubuntu

enabling core dumps for daemon processes

Hello, I am debugging a program which works as daemon. It sigfaults, unfortunately I'm unable to generate core dump file. Here is what I am doing: tsurko@bastila:~$ ulimit -c unlimited tsurko@bastila:~$ ulimit -c unlimited tsurko@bastila:~$ cat /etc/sysctl.conf | grep 'core_pattern'... (1 Reply)
Discussion started by: tsurko
1 Replies

5. UNIX for Advanced & Expert Users

Display modified files in ascending order

Hello, i want to display modified files in descending order. "ls -t" will display modified files in descending order. pls help. (1 Reply)
Discussion started by: balareddy
1 Replies

6. Shell Programming and Scripting

Order text display not correct.

My shell script below for import data to Oracle it run okay. but the text display not correct follow order command executed. =========================Shell Script code================= #!/bin/sh #directory = ${1-'pwd'} #run import data with SQLLoader runSQLLoader() { ... (2 Replies)
Discussion started by: raccsdl
2 Replies

7. UNIX for Dummies Questions & Answers

Daemon, scripts and processes

Hi, I am new to the world of Unix, I need some help in doing a small project at work. Can anyone point out any good references for the below functions? Objective --------- To write a daemon that will run in the central server to 1) access our process(I will find this out), log down... (1 Reply)
Discussion started by: seongyin
1 Replies

8. Shell Programming and Scripting

Echo display alignment/sort order

Hi, My script prints a few varibales as each it reads each line of a text file and then prints them on screen, however iam having problem in aligning and sorting them. what happens is this Last First Number Mark leo 87798798... (1 Reply)
Discussion started by: shackman66
1 Replies

9. UNIX for Dummies Questions & Answers

Processes, Services, Daemon's and Subsystems

I'm just wondering what the differences/relationships there are between processes, services, daemons and subsystems? I keep coming across these terms but I can't find clear definitions/explanations of these terms. :confused: (3 Replies)
Discussion started by: quickfirststep
3 Replies

10. UNIX for Advanced & Expert Users

Spawing multiple display processes from one shell.

Question: Suppose I want to, from the terminal, use a shell script that would do the display image.jpg command to load multiple images from a directory all at the same time. One terminal, and for example 10 image files. Basically I want to execute 10 different commands simultaniously all from the... (4 Replies)
Discussion started by: JoeTheGuy
4 Replies
Login or Register to Ask a Question