Sponsored Content
Full Discussion: Problem listing processes
Top Forums UNIX for Dummies Questions & Answers Problem listing processes Post 302591501 by strawhatluffy on Thursday 19th of January 2012 04:20:20 PM
Old 01-19-2012
[Solved] Problem listing processes

hi!
i wrote this script(ubuntu os):
Code:
clear

echo "number of running processes"

ps -ef | wc -l

but i can't get the number of my currently running processes...
is there a way to see HOW MANY processes are running to my system?

---------- Post updated at 11:20 PM ---------- Previous update was at 11:19 PM ----------

sorry i forgot exit 0 at the end of the script

Last edited by radoulov; 01-19-2012 at 05:21 PM.. Reason: Code tags!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem with listing of directory structure

Hi When im listing (ls -al ) its listing directories without / at the end of directories dir1 dir2 dir3 and i need to list directories with dir1/ dir2/ dir3/ and this should not be made by command ls -F / should be embedded at the last since one of the scripts reads directories... (1 Reply)
Discussion started by: vasanthan
1 Replies

2. Shell Programming and Scripting

processes problem...

The called program gets as parameters two or more integers and and returns 0 if all pairs of two are relatively primes, and 1 otherwise. The callee shall read a sequence of numbers and tell whether they two by tworelatively primes. (1 Reply)
Discussion started by: baku
1 Replies

3. Shell Programming and Scripting

Find problem listing directories even -type f

Hi All, #!/bin/ksh find /home/other -ls -type f -xdev | sort -nrk7 | head -2 >bigfile.txt The above is my script, which writes the large file into a file called bigfile.txt. My script contains only the above two lines. after execution i am getting the output like find: cannot chdir to... (1 Reply)
Discussion started by: Arunprasad
1 Replies

4. AIX

user login problem & Files listing problem.

1) when user login to the server the session got colosed. How will resolve? 2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem? Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies

5. UNIX for Advanced & Expert Users

wiered problem in listing the file

Hi All , I am having a set of file, when i list like ls -l *filename* it is listing all file. If is do ls -l filename.ext it is not listing the file. I dodnt know what will be the cause Example: $ ls -l *13712.* ---- listing in wild card worked total 136864 -rw-r--r-- 1 p68 sup... (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

6. Solaris

Listing processes with swap usage

Is there any way to get list of processes which are taking maximum swap , my system is showing no swap space in /var/adm/messages and i 'm unable to pin down the process which is consuming max swap space. (11 Replies)
Discussion started by: fugitive
11 Replies

7. Shell Programming and Scripting

Listing processes that are a day older

Hi All, I am trying to automate some stuff to make my 'to-do-things' easier. I am in need for help regarding this. I have an output root 17187 3465 0 23:00:00 ? 0:01 Process1 root 4975 4974 0 May 12 ? 0:00 Process2 root 4042 16713 0 Jan 30 pts/22 0:00... (4 Replies)
Discussion started by: reddybs
4 Replies

8. HP-UX

listing processes older than n days

Hello; trying to find processes older than n days, mostly user shells Tried the following code on 11.31 box: in this case older than 5 days UNIX95= ps -ef -o user,pid,ppid,cpu,etime,stime | grep "-" | awk '{print $2}' | xargs ps -ef|grep -v '?' |\ awk '$5 !~ ""' | awk '($5 ~ "$(date "+%b")")... (6 Replies)
Discussion started by: delphys
6 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Problem with listing my files

Hello, In my directory i have got a list of files like below unix1a.csv unix1b.csv unix1c.csv unix1d.csv unix1y.csv I have done ls -lrt unix1.csv, how can i get my unix1y.csv also get listed along with this.. (5 Replies)
Discussion started by: sathyaonnuix
5 Replies

10. Shell Programming and Scripting

Processes problem - Need help

Hello, I can't figure out how to solve this problem. I know that is not something very difficult, but it doesn't work for me. Any help is important for me, thank you! For each command line argument, the main process will launch one subprocess. Each such process will establish if the assigned... (1 Reply)
Discussion started by: Ruinum
1 Replies
KILLALL5(8)						Linux System Administrator's Manual					       KILLALL5(8)

NAME
killall5 -- send a signal to all processes. SYNOPSIS
killall5 -signalnumber [-o omitpid[,omitpid..]] [-o omitpid[,omitpid..]..] DESCRIPTION
killall5 is the SystemV killall command. It sends a signal to all processes except kernel threads and the processes in its own session, so it won't kill the shell that is running the script it was called from. Its primary (only) use is in the rc scripts found in the /etc/init.d directory. OPTIONS
-o omitpid Tells killall5 to omit processes with that process id. NOTES
killall5 can also be invoked as pidof, which is simply a (symbolic) link to the killall5 program. EXIT STATUS
The program return zero if it killed processes. It return 2 if no process were killed, and 1 if it was unable to find any processes (/proc/ is missing). SEE ALSO
halt(8), reboot(8), pidof(8), killproc(8) AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl 04 Nov 2003 KILLALL5(8)
All times are GMT -4. The time now is 03:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy