General :: How To Find Processes Using A Specific Port

Dec 11, 2010

how can i find on a linux system the processes that are using 8080 port (ex a web server)

View 2 Replies


ADVERTISEMENT

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

General :: Finding A Cmd That Will Kill All Processes That Are Accessing A Specific Filename?

Dec 16, 2009

I thought 'killall' would work, but I need to provide the "command" to kill. I'm really looking for a command that will kill all processes that have a particular file/directory open. Currently, my script fails on an 'umount' because there are several processes that have this filesystem open. The command 'lsof' is a good tool to determine which processes have a filesystem open, but I don't really want to write a script that parses through the 'lsof' output to capture PSIDs. Is there a linux command that can kill all processes that may have a particular filesystem open?

View 2 Replies View Related

General :: Command To Check Specific Processes That's Using The Most IO/disk Usage?

Apr 12, 2011

Is there a command to check specific processes that's using the most IO/disk usage? I know sar and ps but I want more specific details on IO on individual processes

View 5 Replies View Related

General :: How To Find And Kill Remote Processes

Oct 28, 2010

I am developing a daemon that is acting up and I am now unable to create any new processes (ie. I cannot start a new process to kill the other rogue processes). So, I need to be able to kill the processes from a remote machine. How do I do "kill" remotely without admin privileges? If I cannot kill my own process from a remote machine as a normal user then tell me so I can mark it as the correct answer.

View 3 Replies View Related

General :: Find Out Processes Are Using Swap Space?

Jun 21, 2011

I have a linux server top reports about 9GB of swap used:But I cannot figure where's it use swap, some google results said that top - O commad follow by p will show swap usage by process. But as shown in the above image, taking a brief sum of the SWAP column shows that > 10GB of swap is used, so where does the 9GB figure for swap usage come from? Top reports that about 96492kb of ram is used by buffers. Is there anything I can do to utilize this, instead of using swap?

View 1 Replies View Related

Ubuntu Networking :: Port Forwarding Through A Specific Port?

Jul 14, 2011

I want to set my ip as static and port forward it through a specific port can anyone help me with this im using ubuntu 10 with 64 bit OS

View 1 Replies View Related

General :: Ubuntu - Find Out Which Processes Consume Most Energy?

Aug 21, 2011

In Linux, is it possible to know which processes consume most battery energy at the moment?

View 1 Replies View Related

General :: Script To Find Disk Utilized Processes?

May 25, 2011

I have written a script that triggers a mail if the server load average goes beyond a specific value.

The mail contains following field Current Load average. Top 10 CPU utilized processes.

Code:
ps -auxf | sort -nr -k 3 | head -10
Top 10 Memory Utilized processes.

Code:
ps -auxf | sort -nr -k 4 | head -10

But the problem is that whenever there is any disk related activity happens the load gets high and the command (for ex.mkfs.ext3 /dev/sdb1, dd,scp,cp)which are the main cause behind the load average doesnt get displayed in top 10 CPU/Memory Utilized processes.

Is there any way of finding top 10 processes for Disk related activity?

View 14 Replies View Related

General :: Stream Webcam On A Specific Port For Friends Having Windows?

Jun 2, 2010

Linux machine is running a webcam. I export my webcam with fswebcam for the moment on a ftp and ssh, but it is so slow.

I wanna stream it, how can I make it and make it simple for the friends ?

View 1 Replies View Related

Red Hat :: Specific Function Of MPM - What Multi Processes It Handles

Jun 13, 2010

I am a bit confused with MPM. I read one the article here: [URL]. Still have few very basic doubts:

1. What exactly is a MPM, a module has a specific function to do whats the specific function of MPM?

2. What are the "multi processes" it handles? Is it connections?
Quoting from the articles:
"The main difference between MPMs and normal modules is that only one of the former can be used and multiple ones can be loaded in the latter".

3. There are multiple MPM but aren't they operate differently and may cause conflict when more than one is loaded and operating?

I am really looking for concept of MPM

View 2 Replies View Related

General :: Setting Up Iptables For Traffic Forwarding On Port 80 From Specific Sources?

Jun 1, 2010

Im running a web server on port80, but i want traffic coming from ip 212.333.111.222 on port 80 to be fowarded to port 9020 on the same server that my web server is rinning at that is my sshd port

View 1 Replies View Related

General :: Find All Child Processes Of A Parent Process Given To Script As Argument?

Feb 15, 2011

well i have just started with shell scripting...how to find all child processes of a parent process given to script as argument.

View 10 Replies View Related

General :: Recursively Find A .doc File That Contains A Specific Word?

Aug 31, 2011

I'm using bash under Ubuntu.Currently this works well for the current directory:catdoc *.doc | grep "specificword" But I have lots of subdirectories with .doc files.How can I search for, let's say, "specificword" recursively?

View 2 Replies View Related

General :: Cannot Find Specific Glibc Tar File For Editing?

Feb 3, 2011

I have the tar file of glibc-2.12.1, but now I want to edit the SPEC file. I can't find it. For those that want a "why", I'm trying to make it smaller. So simply, where is the SPEC file for glibc? (rpmbuild cannot find it in the *.tar.gz file).

View 4 Replies View Related

General :: How To Find A File With Specific String Inside It

May 7, 2010

Is there any way i can find a file with specific word inside it.For example if i want to find a file which has some text written inside it.How would i form a command to search them?

View 5 Replies View Related

General :: Command To Find A Specific Word In Directories And Subdirectories?

Jun 7, 2010

tell me the command used to find a specific word in directories and sub-directories in linux?

View 4 Replies View Related

General :: Find Files With Specific Extension And Move To A Directory?

Apr 18, 2011

I need little help. I want to find all files with extension "*.tar" "*.gz" and "*.zip" and move all those files into "/opt/old" directory. I've tried this command:

Quote:

find . -type f -name "*.tar" "*.gz" "*.zip" -print0 | xargs -0 -r mv /opt/test

It's not working, something wrong after "mv" i guess.

View 10 Replies View Related

General :: Find The Port Of Particular Application?

Jun 21, 2010

How do I find the port which is used by a particular application ?. And how do I terminate that process?

View 2 Replies View Related

General :: How To Find What Program Is Listen On Port 80

Apr 14, 2010

I've killed apache via /etc/init.d/apache2 stop, but something is still listening on port 80:

Code:

root@www:/etc/apache2/sites-enabled# netstat -an | grep LISTEN | grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:8022 0.0.0.0:* LISTEN
unix 2 [ ACC ] STREAM LISTENING 5806 /var/run/mysqld/mysqld.sock

How do I find out that program this is?, or how to I stop it listening?

View 3 Replies View Related

General :: Http - Find Out Which Process Is Listening On A Port?

Mar 16, 2011

How can I find out which process is listening on a port on linux?

View 5 Replies View Related

General :: How To Find (and Kill) Process Running On A Certain Port

Aug 12, 2011

Possible Duplicate: Finding the process that is using a certain port in Linux I'm using Ubuntu Linux 11.04. How do I write a shell script expression that will find the process running on port 4444 and then kill the process?

View 4 Replies View Related

Server :: Get FTP To Use A Specific Port Number?

Mar 17, 2011

How do I get FTP to use a specific port number? .. I read the manual but cannot work this one out.

View 2 Replies View Related

Debian :: Connecting To SSH With Specific Source Port

May 14, 2015

I'm looking forward to know how to connect to a remote server through SSH but from a specific port, so I con drop connections from random ports that's not the one I choose. Is this possible?

I have tried by setting up an iptables entry to forward output through both, PREROUTING and OUTPUT (one at each time, flushing when I can see that it's not working), in NAT table, so I can connect doing ssh localhost

Code: Select alliptables -t nat -I OUTPUT -p tcp -s 127.0.0.1 -d 127.0.0.1 --dport 4141 -j DNAT --to 192.168.1.2:4040

Unfortunately, it is not forwarding as I'd like.

I want to do this because I think that doing this will enhace the security, dropping connections of clients that are trying to connect from not allowed ports. I have already set up fail2ban and created SSH keys, not allowing to login with password, only key allowed. Will only allowing connections from a specific port will enhance the security or not really?

View 4 Replies View Related

Debian :: SSH AllowGroups Specific To Port Number?

Sep 17, 2010

Is it possible to setup SSH Daemon to listen on multiple ports and only accept specific groups to a given port? In the past I've created a second SSH Daemon by copying the config file and /etc/init.d/ daemon then configuring each port separately / rules however if I was able to maintain just the one Daemon that would be optimal. Is this possible?

View 1 Replies View Related

Networking :: Generic Way To Block Specific Port?

Jul 9, 2011

Recently I discovered that we were accidentally running a POP server (port 110), when we only should have been running the encrypted version thereof (port 995). This wouldn't have been a problem if the port was blocked in the first place. I had wrongly assumed that any port NOT specifically listed in one's firewall rules (CentOS 5 with default iptables installation) would be blocked. I thought you had to add a rule to /etc/sysconfig/iptables in order to open up a port. Apparently this is NOT the case. So is it true that if I install some random software that starts listening on any number of ports that I have not specifically mentioned in /etc/sysconfig/iptables that it will not be blocked - it will work right away?

Anyway, I guess two questions:
1) What's a generic way to block a specific port? I use rules like this to "open" ports (although is this not needed if they're open anyway?)
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 995 -j ACCEPT
What's the analog of this kind of rule to *block* a port?
2) Is there a better way to configure iptables to block all ports that are not mentioned in its configuration? Is that dangerous? (will it block things that I don't want to block?)

View 3 Replies View Related

Networking :: Route Only For A Specific Port And Target?

Mar 14, 2011

I have to route some packages over the right interface.I default route everything for the target-network over one network-interface. That works perfectly. But i have to route packages for one specific host and one specific port over another network-interface. I tried many things with the route-command, but i think there's no possibility to route only one port? May i can do this with iptables? I only found ways to forward some packages, which are coming in over one interface. But in my case all packages go out over one interface.

View 13 Replies View Related

Networking :: Trace Route On A Specific Port?

Dec 4, 2009

I've got a few systems which forward ports to one another all over the place, and somewhere along the line a port forward fails. I want to trace the route of a connection on a specific port to see where the connection hits a wall, to see what system is causing the problem. I've tried `tracetoure -T -p <port>` but it doesn't output anything about the ports it hits, stops when it hits the address I supplied even though it is forwarded elsewhere, and there doesn't seem to be a verbose mode. interstingly, if I specify a different source port via the '-s' option, the trace keeps hopping to * * * * and never get anywhere (at least to 27 hops then I CTRL+C)

View 6 Replies View Related

Ubuntu :: Find Cumulative CPU Time For Processes For An Interval?

Feb 20, 2010

I want to find the cumulative CPU time used by each process between two points (defined by the user, e.g. running a command or clicking a button).

A first stab at this would be running

Code:
ps -eo pid,cputime

at the beginning of the interval and at the end, then doing some arithmetic on the two sets of results. But this only shows whole seconds of cputime ... and what about processes that started and stopped during the interval?

View 1 Replies View Related

Programming :: Find Number Of Child Processes (C / POSIX)?

May 26, 2010

I'm in the process of writing a program that is a server- it will accept connections and stuff, and spawn a child process for each. However, i've run into a small problem. I do NOT want to bother with keeping track of the processes unless i need to. So, i set SA_NOCLDWAIT (#ifdef) on a SIG_IGN to the SIGCHLD handler through sigaction interface. The standard says that it the kernel will then keep track of reaping zombie processes for me (a HUGE plus). However, upon receiving a SIGINT signal, i want to stop the server from accepting new connections (done), and then wait for there to be no new connections. I was thinking of just putting a loop like so:

Code:

while((wait(NULL) != (pid_t)-1) && errno != ECHILD);

However, I'm not *sure* that this will work, especially with SIGCHLD still ignored. So how can i tell if there are still child processes? I can't find any call like int getnumchld(pid_t proc); (i wish). Plus it would be inefficient to spin on that function anyway. OTOH, i would rather *NOT* have to do the same thing in a loop with a system("ps |...>file"); read(file); etc. either. Is there a way i can portably implement this feature (I was hoping i could run it on linux and the major BSDs, at least).

TO SUM IT UP:

How can i tell if a process has no child processes if i've SIG_IGN'd SA_NOCLDWAIT'd the SIGCHLD? Is there a _reasonably_ portable way to do so? I *don't* want to manually wait for EVERY process. Maybe only those still active at the time of SIGTERM, but that requires keeping track of the number of connections and whether those have terminated...

EDIT: Does anyone know if the above code *would* work, even with SIGCHLD ignored and the kernel cleaning up zombies *for* me? I checked the manpage and it doesn't say much.

EDIT1: Note that all of the processes are in the same process group and session. SO i can find them through this as well. Perhaps even setting the uid/gid and finding all processes run by that group?

EDIT2: i have an idea if the above isn't feasible. If there is no "elegant" way to do it, i could reduce the complexity by sending a SIGUSR1 to the whole process group. Each process would then set a flag telling it to send a SIGUSR1 in reply and send a SIGUSR2 when it is done executing. Then i could keep a count of signals. Maybe that would be *easier*. Or perhaps a count of all child processes and just a termination signal to decrement the counter.

View 2 Replies View Related







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