You are on page 1of 2

# ROLL NO:# UNIX & SHELL PROGRAMING.

# ---------------------RACTICAL-05---------------------------# SIMPLE SHELL SCRIPT TO LIST VARIOUS ATTRIBUTES OF PROCESSES


#!/bin/sh
function line()
{
echo -e "\n
*************************************************************";
}
line;
echo -e "\n\t\t\t Listing Attributes of processes";
line;
ps -a -e -F|more;
line;
=========================OUTPUT================================
[root@localhost ~]# sh Unix-Practical-5.sh
***************************************************************
Listing Attributes of processes
***************************************************************
UID
PID PPID C
SZ
RSS PSR STIME TTY
TIME CMD
root
1
0 0
515
616
0 10:37 ?
00:00:00 init
root
2
1 0
0
0
0 10:37 ?
00:00:00
[migration/0]
root
3
1 0
0
0
0 10:37 ?
00:00:00
[ksoftirqd/0]
root
4
1 0
0
0
0 10:37 ?
00:00:00
[watchdog/0]
root
5
1 0
0
0
0 10:37 ?
00:00:00
[events/0]
root
6
1 0
0
0
0 10:37 ?
00:00:00
[khelper]
root
7
1 0
0
0
0 10:37 ?
00:00:00
[kthread]
root
10
7 0
0
0
0 10:37 ?
00:00:00
[kblockd/0]
root
11
7 0
0
0
0 10:37 ?
00:00:00
[kacpid]
root
47
7 0
0
0
0 10:37 ?
00:00:00
[cqueue/0]
root
50
7 0
0
0
0 10:37 ?
00:00:00
[khubd]
root
52
7 0
0
0
0 10:37 ?
00:00:00
[kseriod]
root
115
7 0
0
0
0 10:37 ?
00:00:00
[pdflush]
root
116
7 0
0
0
0 10:37 ?
00:00:00
[pdflush]
Page 1 of 2

root
117
7 0
0
0
0 10:37 ?
00:00:00
[kswapd0]
root
118
7 0
0
0
0 10:37 ?
00:00:00
[aio/0]
root
266
7 0
0
0
0 10:37 ?
00:00:00
[kpsmoused]
root
290
7 0
0
0
0 10:37 ?
00:00:00
[ata/0]
root
291
7 0
0
0
0 10:37 ?
00:00:00
[ata_aux]
root
294
7 0
0
0
0 10:37 ?
00:00:00
[scsi_eh_0]
root
297
7 0
0
0
0 10:37 ?
00:00:00
[kjournald]
***************************************************************
[root@localhost ~]#

Page 2 of 2

You might also like