Programming :: Find The Active TCP Connections And PIDs Corresponding To Them?
Oct 19, 2010
I am programming on Linux middleware so I need to get a list of all active TCP connections. Is there any API to get such information? I know I can find the connections in /proc/net/tcp, but how to find the PIDs? Apparently ps or netstat command is not an option since it is a middleware.
View 6 Replies
ADVERTISEMENT
Nov 21, 2010
how can I store the output of (ty to colucix for this line)
Code:
xprop -id $(xprop -root | awk '/_NET_ACTIVE_WINDOW(WINDOW)/{print $NF}') | awk '/_NET_WM_PID(CARDINAL)/{print $NF}'
in a variable and then pass the value of that variable to the kill command as the PID to kill?
View 3 Replies
View Related
Jun 28, 2010
i need C code to get child pids from its parent pid in linux and in kernel mode, is there anything like getpid() or getppid() which works in kernel mode?
View 2 Replies
View Related
Oct 20, 2010
I have several users on handhelds and they like to let their sessions time out. Their zombie processes then cause record locks.I've come up with calls for killing the pids for any prior sessions started by a given user. This procedure would be executed in the .bash_profile.
View 3 Replies
View Related
Sep 29, 2009
I've created VPN server(PoPToP version 1.3.3) using webmin and all clients are connected successfully. I want to check "current active connections" from CLI(command line interface). what is the command to list all active connections.
View 1 Replies
View Related
Feb 26, 2010
I am running Firestarter on Ubuntu 9.10 64 bit. I have noticed several times that after closing all web apps (Firefox, Thunderbird) that some entries remain under the heading "Active connections" on the Firestarter "Status" tab. Often these show no source program. Currently I have 2 showing which show Firefox as the source. These persist after Firefox is shut down. I have verified that no Firfox process is running. And both of the IPs point to google.I have Disconnected eht0 and they still show. I have logged out and back in and they still show. I must reboot the machine to make these entries go away. Which makes me think perhaps this is a bug in Firestarter(?) Is there another way I can identify truly active connections?
View 2 Replies
View Related
Apr 23, 2011
My Debian server is used by people to set up ssh-tunnels for use as a local proxy ( on their remote machines).Since only the tunnel is setup, and no shell is used, I can't use "who" to see which users have an active ssh-tunnel on my server, but I would like to have an idea about who is active etc. I think I should be able to determine this from the auth.log file, but then I would have to use some script to determine what connection is still active. Is there an easy way to see what users have active ssh-tunnels on my Debian server at any given moment?
View 3 Replies
View Related
Jul 24, 2011
On every machine that SSHes in, the connection gets dropped randomly between immediately, and 30 minutes into the session, while the user is actively using the remote system (typing, etc). Before, during and after the disconnection, the system responds to pings regularly (0% packet loss).It takes about 5-10 minutes before I can make an SSH connection again.I have tried restarting SSH on the server and rebooting the server. I even removed and reinstalled sshd and it is still happening.What might be causing these random disconnects and how might I solve this?
View 1 Replies
View Related
Oct 12, 2010
When I typed netstat -lna, the output:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:580 0.0.0.0:* LISTEN
...
...
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node
unix 2 [ ACC ] STREAM LISTENING 23581
...
...
Can anyone explain to me:
1. What is "Active Internet connections" & "Active UNIX domain sockets"?
2. What is unix Proto?
3. Difference between LISTEN and LISTENING state.
View 8 Replies
View Related
Apr 19, 2010
Just i want to ask doubts in c programming. I dont know whether this is the right place to ask doubts in c. If this is not a correct place, may i know where can i get help for c programming?is there any active forum or mailing list for c programming?
View 6 Replies
View Related
Feb 7, 2011
have a problem with my network-manager in ubuntu 10.10.when I dial one of my vpn connections, my other vpn connections be disabled and I can't use them!I tried to restart network-manager and gnome-panel, but it does't seem to solve this problem.
View 1 Replies
View Related
Feb 12, 2015
I recently installed Debian 7.6 64-bit on Dell Vostro 1520 laptop.Using Gparted, create extended partition in the remaining disk space 67.91 GB
Install Debian 7.6 as follows
Code: Select all/dev/sdb5 / 8GB Ext4
/dev/sdb6 / home 17GB Ext4
/dev/sdb7 swap 5GB
I opened a terminal and ran some commands to show the results below....
Code: Select allroot@DELL-DEBIAN:/home/hugh# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda7 partition 4979708 0 -1
root@DELL-DEBIAN:/home/hugh#
Code: Select allroot@DELL-DEBIAN:/home/hugh# cat /etc/fstab
# /etc/fstab: static file system information.
[code]...
I have a couple of questions....
1. Does the data above indicate everything is running as it should?
2. What does this command tell me about swap? "/sbin/swapoff /dev/sda7" I read somewhere it should be run on 64-bit system but not sure what it does.
3. Is the command "cat /proc/swaps" the best way to determine if swap is running ok?
4. Can I share this swap partition with another distro, e.g. Ubuntu or Xubuntu? as I would like to multi-boot for testing purposes.
View 14 Replies
View Related
Dec 15, 2015
I bought a bluetooth pen, I connect it via USB, my bluetooth connection is active but I can't find other therminals, and my debian machine it isn't visible to other terminals.
It seems that my bluetooth connection works, but it can't pair other terminals. I want to connect bluetooth speaker, but it seems impossible.
View 3 Replies
View Related
Aug 12, 2010
I am trying to update four OpenSUSE 10.3 servers. This worked once on one server, but I have been unable to repeat that success. I use yast's Online Update to select repositories, but at the end of the repository refresh they keep coming back with 'No active update source is available. Exit Online Update now?' I get this error:
Download failed: File /repodata/repomod.xml not found on media: [URL]
It appears to connect to remote repositories, but always fails. Is it realistic for me to expect to update 10.3, or is it a lost cause? I am not ready to jump to 11 yet, but I am required to update them. I am a newb, so I am not clear on the process. Are package versions locked in place for specific versions of OpenSUSE? If so, how can I find out what the final versions were for 10.3 so that I can at least tell my auditors that they are as up-to-date as they can be?
View 9 Replies
View Related
Jul 26, 2011
Is there a linux command (or command combination or utility) that can identify all processes (PIDs) that are sharing a TCP/IP stack ?
View 4 Replies
View Related
Jan 14, 2009
Command top displays the pids (tasks) by order of CPU usage. Could I make it order them by memory usage?
View 3 Replies
View Related
May 10, 2011
Is it possible to list all jobs and their pids from a certain time frame? For instance if I needed to see all completed jobs from yesterday how would I do this? I've tried jobs -n but that was messed up because I had typed jobs right before that.
View 1 Replies
View Related
Apr 20, 2010
I run my own icecast2 server. In the near future it looks like, I will be doing some shows. I would like to beable to change my link, so if I am broadcasting, to go to the stream if not pop a box for my schedule.Now from when I was checking to see if my webcam was up or not, i used this.does anyone know haw to change my code for this? I know when I'm not stream it generates a 404 error, in winamp (on windows)
View 3 Replies
View Related
Jun 28, 2010
Detect the current window that has the focus. For example at the moment am using firefox therefore teh function should say firefox is the main window.
View 2 Replies
View Related
Mar 8, 2011
iam just trying to connect to server which accepts one client and server will read(blocking operation) infinitely, but After closing the client socket the server "read operation" is returning zero and "errno variable(in errno.h)" value is also zero. how can i detect whether a client socket is closed/active..?
client.c
Serv_Addr.sin_family = AF_INET;
Serv_Addr.sin_addr.s_addr = inet_addr("127.0.0.1");
Serv_Addr.sin_port = htons(26553);
if( 0 > connect (Serv_Fds,&Serv_Addr,sizeof(Serv_Addr)) )
{
perror("connect");
return 0;
[Code]....
View 3 Replies
View Related
Mar 11, 2011
how to setup an Active/Active Load Balanced and High Available (If one of the nodes is down the system still runs) MySQL cluster. I have found quite a few howto's but I have some things unclear in my mind. I found a few solutions like this one: [URL] or this: [URK] Those are using two or four MySQL nodes, two Load Balancers to avoid a single point of failure but only one MySQL cluster management server. What happens if the MySQL cluster management fails?
I have also found a "MySQL Master-Master Circular Replication" technique but from what I read, with this option there is a chance that conflicts will arise if node A and node B both insert an auto-incrementing key on the same table.
View 1 Replies
View Related
Jan 4, 2010
i've written a socket server. when i launch a client, it connects to servers running on various machines on my local network, which then reply to the client with some string messages, and the client exits.
however, when i launch the client repeatedly (say 5 or 6 times in quick succession) the client is unable to bind to its local port. this appears to be because servers are still trying to connect to the client machine's port, even though the client exited and shut the socket down. the actual error i receive is "Error binding socket to 192.168.1.6:44561: Address already in use".
so, is it enough just to shutdown and close a socket? is there some way that in doing so the client machine can send a CONNECTION_REFUSED message to any machine trying to connect to it? i am using PHP, not that that should make much of a difference i hope.
the problem resolves itself after around 20 seconds as the machines trying to connect to the client timeout. i still need to fix this issue though.
View 2 Replies
View Related
May 28, 2009
I am writing a server which uses edge-triggered epoll. When the server calls accept(), it just extracts the first connection in the pending queue. If there are more connections that are waiting, can we make the server accept all the pending connections? I wrote a loop like the following:
do {
client_fd = accept(...);
/* Work with the client fd */
} while (client_fd != -1); [/code]
Doesn't seem to work. A related question, more a clarification, is as follows. My understanding was that a connect() at the client returns only when accept() in the server returns. Clearly, I was incorrect. Even with no accept() call in the server, my client was able to connect and send data. Am I getting this right?
View 2 Replies
View Related
Dec 1, 2010
I am trying to install I get some sort of error relating to the hard drive, on ubuntu it's that it can't find an active filesystem, on XP it blue screens and tells me to run chkdsk. I've tried with a few different hard drives, all of which allow me to boot into the already installed OS fine, but give me the exact same error when trying to install an OS. After playing around taking the hard drives in and out and reformatting them it will occasionally get past the problem, but not without a significant amount of screwing around, and if I don't install on that occasion and just restart without changing anything the problem will reappear.
View 2 Replies
View Related
Apr 18, 2011
I execute: mysql -u root -p and asks for a password after I put the password and ENTER the following error! ERROR 1040 (00000): Too many connections Can you tell me where is the folder of mysql? For me to edit the my.cnf?
View 12 Replies
View Related
Jan 21, 2011
Is it fair to say that connLimit and hashlimit are very similiar on Linux i.e. while hashlimit caters to limits for groups of ports, they both set the connection rate limit per host? How in IPTables, do I configure a policy that limits connections on a port that encapsulates the total sum of all connections from all hosts? i.e. I do not want to allow more than 6000conn/minute for port range that is the sum of all connecting hosts?
View 3 Replies
View Related
May 30, 2011
I recently installed Fedora 15 now, and during installation I set the internet connection manually, then did update and after reboot, the internet connection settings have been removed. Now I can not set because the network connection to the Internet Connection is inactive. I mention that before the update was functional internet connection.
View 5 Replies
View Related
Mar 12, 2010
Basically the requirement of the script are :
1. need to run like a daemon which will read an active squid logfile in a refresh pattern of 5 minutes
2. calculate the total number requests based on different domains that the client access
3. calculate the total of number of requests based on different domains as well as the turnaround time of these access is more than 5 sec that the client access
4. calculate percentage of item 3 over item 2
5. report the results in html format as follows:
Domain Name Total req Req > 5 sec % of req > 5 sec
6. able to access the results from web browser.
View 8 Replies
View Related
Dec 19, 2008
I am unable to find a description of alsa's programing language, this sort of stuff:
[Code]...
I need to know what, for example, 'ttable' means and what is its syntax. This seems to be a state secret.
View 2 Replies
View Related
Nov 9, 2010
I have a process running on Linux.When i do ps -eaf | grep <myProcess>, it show muliple entries for <myProcess> with different pids for each entry.Kindly tell me what could be the reason for a process having multiple pids?
View 1 Replies
View Related