General :: Shell Script Searches Processes Running?

May 20, 2010

how to write a shell script the searches for processes running on my system. I really don't know where to start. can anyone give me a hand and explain how the script works?

View 3 Replies


ADVERTISEMENT

General :: List The Currently Running Processes Via Code A Shell Script?

Feb 5, 2011

how to list the currently running processes via code a shell script. FYI i now about the top method in the terminal but i need a way to have it via a shell script.

View 4 Replies View Related

General :: Kill All Processes Except Shell Window?

Aug 3, 2010

i was referring to an article given in following website.[URL] I was surprise to know that i can kill all running processes by using kill 0. However when i tried running the command nothing happened.

my machine details:

Code:

# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description: Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
Release: 5.2
Codename: Carthage

View 4 Replies View Related

General :: Writw Shell Script To Kill Processes?

Oct 19, 2010

I am trying to write a script which when executed should kill all currently running cat processes.

View 1 Replies View Related

General :: How To Know What Processes Are Running

Jun 6, 2010

GNU/linux kernel 2.6, Slackware 12.0.Hi:How do I know what processes are running?

View 6 Replies View Related

General :: How To Count How Many Of Processes Are Running

Nov 3, 2010

I list all the instances of a running process my doing:ps -ef | grep myprogramThis lists all them.how can I simply output a count of how many are running?

View 2 Replies View Related

General :: Administrator - Command Used To View Processes Running

Nov 9, 2010

The command used to view processes running on the Linux machine is?

View 8 Replies View Related

General :: Print The Number Of Processes That Each User Is Currently Running In Unix?

Mar 6, 2011

I'm trying to get the end result to have the same format as this as well:

1 bin
2 daemon
67 erozner

[code]....

Where the numbers are the number of processes being run by the user (the name right next to it).if I input the command egrep myFile into the terminal, it should look for every line with the letter x in myFile, right?

View 5 Replies View Related

General :: Tools To View/edit User Space Memory Of Running Processes?

Nov 2, 2010

Are there any tools to view/edit user space memory of running processes on Linux?

It would be a great learning tool.

View 1 Replies View Related

General :: Vim: Setting Case Insensibility In Searches?

Jul 27, 2010

Linux kernel 2.6, Slackware 12.0

How do I set case insensibility in searches running vim? I thought I could find this in the manual or the in browsing help within the program itself, but it was not long before I realized I was mistaken.

View 5 Replies View Related

General :: Write A Script That Searches Files By Date?

Jul 26, 2011

I'm trying to write a script that searches my files and lists them by date. Can someone point me in the right direction? I've been looking through the books that i have but i'm just not finding the right commands to search dates.

View 7 Replies View Related

General :: Web Searches Cannot Locate Way Of Specifying 'each File In Current Directory'

Mar 23, 2011

I have several directories of subtitles for some videos, but all the text for the subtitles in each file is in uppercase, and I would like to convert the files' content to lowercase, all in one go. I found on a website a bash command that would do each file separately:tr '[:upper:]' '[:lower:]' <input.txt> output.txt but of course involves specifying the input name and output name for each file.I have been trying to do it in a script that would work for all files in the current directory, without having to rename them each time, if that's possible. So far I've got the following, which doesn't work:

#!/bin/bash
for file in $@; do
tr '[:upper:]' '[:lower:]'
done

However, my web searches cannot locate a way of specifying "each file in current directory" in conjunction with the "tr" command, but also without having to rename the file once converted to lowercase. Is it possible, or would the tr command have to create a new file for each converted file?

View 3 Replies View Related

Programming :: Shell Script: Wait On Two Processes At The Same Time?

Mar 16, 2010

I'm writing a script that needs to spawn 2 or more processes and wait for their return status. I have a method to do this by waiting on each process individually like this:

Code:
process1 &
PID1=$!

[code]...

View 14 Replies View Related

General :: Running An ASP Page From A Shell Script?

Jun 18, 2011

I am trying to access an aspx page which, when accessed with certain parameters in the URL, downloads a file. I need to do this with a shell script, rather than interactively. I tried using wget, but I get a response of 302 from the server, which redirects me to the default page and then downloads the default page html itself. I quickly tried curl which seemed to be doing the same thing. It works perfectly from browsers on either Linux or Windows. Originally, I had a problem with interpretation of ampersands in the URL, but I put quotation marks around the URL, so that isn't the problem now.

I cannot fix this on the server side, because the aspx page will be accessed on a variety of servers which are probably all set differently and which aren't under our control.

View 5 Replies View Related

General :: Running Shell Scripts With Cron

Sep 24, 2009

I've been having a bit of trouble running a shell script with cron. A friend of mine does a community radio show and the station has a live stream but no podcasts, so I've set up a script to record the stream and encode it as an mp3 while I'm away using mplayer and lame -that's what I'm trying to do anyway.

Here's the script, but it doesn't seem to run- at least, I don't see any of the files it should be outputing, would they be in the cron.weekly directory (where I have the script) or in my home directory?

#This is a script to record 'The Unnamed Show'

#it will record the show from the live stream, then convert the output #to an MP3

#Finally, it will delete any files no longer required HOME=/home/byron/

View 2 Replies View Related

General :: Running My Shell Scripts As Root ?

Aug 18, 2010

I have been playing around with shell scripting, nothing too complex just learning the basics. if i try to run a script as root (by entering "sudo" then the "command") it says command not found. i can only do it ass root if i specify the full path (/home/username/bin/command) im pretty sure the directory that my scripts are in are part of the superusers path.

View 14 Replies View Related

General :: Running A Shell Script In E-mails?

Mar 11, 2011

I know that shell scripts can be used to execute more than one linux command at the same time. But can the same be performed in an e-mail (i.e) whenever i open that specifice-mail, the linux command should execute.

View 6 Replies View Related

Debian :: Running Boot Processes In Parallel?

Apr 5, 2011

Does Debian 6 "Squeeze" automatically run boot processes in parallel if not how do I

configure it to do so. Here is the quote from my /etc/init.d/rc :
# Specify method used to enable concurrent init.d scripts.
# Valid options are 'none' and 'makefile'. Obsolete options

[code]...

View 2 Replies View Related

Ubuntu :: Ssh Banner With The Number Of Currently Running Processes?

May 18, 2010

I would like to do the following: Create a banner for any user logging in through ssh which warns him/her about the number of processors being used already by other users (or conversely the number of free processors). For example, if a user logged in he would then see a message like: Warning! 7 out of 8 processors are in use.I already figured out how to do a banner and with ps -e -o pcpu I can get all processes' %CPU usage. I think I would like to count the number of processes which have more than 90% CPU usage and output this number ("7" in the example) in the banner

View 7 Replies View Related

Ubuntu Security :: Do Not Know If There Are Scripts Running On The Processes Or Not?

May 7, 2011

To: The Cog >>>

Code:
The Cog, heres the reszults for ps -ef | grep tty:
yo mama@blah:~$ ps -ef | grep tty

[code]....

View 9 Replies View Related

Ubuntu :: Task Manager (To See Running Processes)

Feb 8, 2011

Ubuntu 10.10. I am curious if there is kind of task manager in ubuntu I can see running processes etc? Like windows task manager?

View 5 Replies View Related

Networking :: Find The PID For All Processes Running For A Particular Port?

Apr 15, 2010

How can I find the PID for all processes running for a particular port?

View 3 Replies View Related

Server :: Another Session Logged In But Running No Processes?

Jan 30, 2011

My University gives us access to a Linux server, named stud1.

Code:

me@stud1:~$ uname -a
Linux stud1.some.univ.ac 2.6.9-89.31.1.ELsmp #1 SMP Mon Oct 4 21:41:59 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

Apparently I was logged in, and never logged out sometime:

Code:

me@stud1:~$ who
<snip>
me pts/37 Jan 30 13:27 (6.6.66.66)
<snip>
me pts/58 Dec 30 19:13

but when trying to find out why I'm still logged in, I can't find it:

Code:

me@stud1:~$ ps faux |grep me
root 30030 0.0 0.0 51128 4360 ? Ss 13:27 0:00 \_ sshd: me [priv]
me 30033 0.0 0.0 51132 2336 ? S 13:27 0:00 \_ sshd: me@pts/37

[code]....

how can I logout this unused session?

View 2 Replies View Related

Programming :: Process P4 To Terminates Processes P1, P2, P3 If They Are Running?

Aug 18, 2009

I have p1,p2,p3,p4 some processes created by me in C. p1, p2, p3 are started individually from several consoles. And I want process p4 to terminates processes p1, p2, p3 if they are running. Which is the easiest way to accomplish that? put all processes in the same process group and send from p4 a kill signal to the group. But I couldn't do that because I cannot call successfully setpgid(getpid(), 15000) from p1-p4. It's there some way to put them in the same group? the processes don't have a child-parent relationship, they are launched manually from consoles.

View 1 Replies View Related

Ubuntu :: Processes Running In Xubuntu Seem Excessive?

Mar 15, 2011

When I ps -e, I see a whole bunch of processes, many more that when I ran Slackware.Is there a list of processess I can look at to see what they are and what ones I dont need, instead of googling each one and getting some cryptic explanation?

View 2 Replies View Related

General :: Pass Parameters To A Shell Script Running As Cronjob?

Dec 7, 2010

I am new to bash scripting (not programming in general).

I am writing a bash script that will run a Python script I have written.

I want to be able to do the following:

Pass parameters to the bash script via the cronjob (so I can have two cron jobs) one to be run with parameter 'foobar', and the other 'foo'
switch based on the parameter passed to the bash script (by switching, I mean an if/else based on the paramter passed to the bash script).

View 3 Replies View Related

General :: Running Shell Program On Startup As Root In Terminal

Aug 4, 2010

I am running Linux Mint 9..I play xbox live and run it through my laptops wireless network connection so i dont have to pay 100 dollars for the usb wireless adapter for the xbox. In windows 7 this is easy to configure so that when i turn my laptop on and then xbox it automatically connects.

View 10 Replies View Related

General :: Measuring Time That A Program Is Running In Shell Script

Nov 11, 2010

I have a script that executed 100000 C Programs, reads the commands from a file and executes them. There is a requirement to measuer the time that each of this 100K C programs running.If it exceeds 120 sec I want to Kill that Process.Any Idea to embed this in my shell script?

View 4 Replies View Related

General :: Shell Script To Check Whether Mysql Server Is Running Or Not

Apr 27, 2009

from nmap localhost | grep mysql command i will come to know whether mysql server is running or not.my problem is i want to test whether mysql server is running or not in shell script and if it is running i need to tell the user to stop the server to run the shell script.

View 3 Replies View Related

Ubuntu :: Disable Access To Running Processes For Some User

Jan 9, 2010

is there any possible way to hide currently running processes from an user? This means I do not want him to know about what programs/processes does any other user but him run. In short words if that user runs 'ps -aux' he should get only his processes.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved