Programming :: EPOLL Echo Server Not Concurrent?
Feb 16, 2011
I am working on an epoll version of an echoserver that I am porting from a multithreaded version I wrote.What it should do: The server should get a connection from a client > say x client connected > print x message from said client. What it is doing: The server looks like it is only accepting one connection at a time, and any other clients are queued. When the queue is empty it looks like the program is aborting with a SIGABRT. EDIT:// fixed the program exiting in the close function. Still one client at a time
Code:
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
[Code]...
View 5 Replies
ADVERTISEMENT
Apr 7, 2011
I am trying run audio conversion on my server that I want limited to a certain number of processes based on process name. I am using the following script but it isnt limiting the number of job like I want it to.
Code:
#!/bin/bash
$num_jobs = 13
while [ $(ps -A | grep -v grep | grep -c pacpl) -ge $num_jobs ]
do
sleep 1
[Code]...
View 3 Replies
View Related
Feb 11, 2011
I've got a lamp solution deployed that I didn't write but I do have root access to the server. What might be the best way to determine the number of concurrent users accessing this web app throughout the day?
View 2 Replies
View Related
Apr 20, 2011
Is there any limitation of concurrent ftp connections that can run on the RHEL 5.2 server? I cannot find out the answer yet.
View 2 Replies
View Related
Sep 3, 2010
i am using apache 2.2.16 version.. i want to improve my concurrent users..
View 5 Replies
View Related
Jul 12, 2011
More of a "Knowledge" question... Is their a limit to the number of reads a single file can take? Say for example I have a file named config.xml in an htdocs directory and a XMLReader function from PHP reads some value(s) out of this file for every connection of Apache or NGinx. Now suppose my site receives a gigantic spike in traffic (but Apache stays opertational through it all)... Is their a point at which the underlying system would simply not be able to open+read config.xml anymore??
View 2 Replies
View Related
Feb 1, 2011
I am using ssh server to connect to my Ubuntu desktop. I opened the file sshd_config and change my port number of the server.I want to put a limit on the number of clients in the ssh server.
View 2 Replies
View Related
Jun 17, 2009
I am trying to echo some value using awk, and for reading the file i am using cat command. If there no space in the file content then the following script result correctly.
console: # cat 1
one;two;three;
four;five;six;
[code]....
In case any space is there in the file 1 then i am facing the problem in the output value
console: # cat 1
o ne;two;three;
four;five;six;
[code]....
View 5 Replies
View Related
Jan 18, 2010
I'm confused about what "echo $0" in a shell actually return. Consider these tests:
Code:
[root@e11apvl151 ~]# # Login shell:
[root@e11apvl151 ~]# echo $0
-bash
[root@e11apvl151 ~]# # Starting a new shell
[root@e11apvl151 ~]# bash
[root@e11apvl151 ~]# echo $0
bash
[root@e11apvl151 ~]# screen
[root@e11apvl151 ~]# echo $0
/bin/bash
Depending on wether the shell is a login shell, a regular shell, or a screen utility, I get different results.
View 8 Replies
View Related
May 20, 2009
There is a transient bug in my code which I just can't catch.
The basic idea is this. I have a multithreaded server and two thread pools, the IO pool and Worker pool. The main server thread listens to incoming connections. When it gets one, it dispatches a thread from the IO pool to read the socket. An IO thread reads the socket. If there is data, it invokes a thread from the Worker pool. This thread then finishes off the processing including closing the socket. The code follows.
Before I show the code, let me tell you what's happening when I am testing it. I have a client program which has about 30 threads, each opening a separate socket connection with the server. Each sends a request which the server responds to. Sometimes I have all the threads finish in a zip. Sometimes both the client and the server hangs. And yet at other times, the client gets a connection refused message.
Now the code. I have omitted some of the nitty-gritties, including possibly variable declarations. I'll post them if it's required.
View 1 Replies
View Related
Jan 11, 2010
I am testing the serial ports on a Single Board Computer(SBC) running Linux kernel 2.6.29. I usually do this by connecting the serial port to another PC serial port, then doing "cat /dev/ttyS0" on PC and "echo hello > /dev/ttyS0" on the SBC. However in the current system, "echo hello > /dev/ttyS0" command does not return at all! Also no characters appear on the destination port. I am running the echo command as root. The system boot messages show that the serial port in indeed /dev/ttyS0.
View 2 Replies
View Related
Jan 25, 2010
I have always encountered this problem in ubuntu bash shell scripts that echo command in a function will be treated as a return value when used in a function. e.g.
[code]...
The output would simply be xyz. Hence the echo seems to function as a "return" command when used in a function with a return value.
View 4 Replies
View Related
Dec 1, 2010
What's the difference between PHP echo() and PHP print(), especially in the execution time?
View 6 Replies
View Related
Jan 25, 2011
I try to write script and echo two command at the same line .
echo "A"
echo "B"
How can I pipe above two command at the same line in text file . So, in the output text file , you can see below ? Code: A B not Code: A B
View 4 Replies
View Related
Mar 13, 2011
I am a student taking part in a comptition. We have a set of questions to complete within today. Can anyone please help me out with it. I have a custom written "echo" program in C, running on port number "1220" which echoes back the first 16 characters of whatever is given as the first command line argument. But somehow, my brother had got unauthorized remote root access. The program is given below. How did he do it? Please give the exploit code and explain how it works.
#include
#include
void echo(char* input) {
[code]....
View 2 Replies
View Related
Jan 4, 2010
I have a problem to use echo to display the content of a variable.
This is what I do:
Code:
#!/bin/bash
USAGE="Usage: name [OPTIONS] [DIRECTORIES]"
echo $USAGE
When I run this little script I get the following output:
Usage: name [OPTIONS] R
So I think that [DI might be some sort of escape sequence. But I do not know how to unescape it. Does anyone have a hint for me?
View 14 Replies
View Related
Dec 16, 2010
What is the difference between
$echo cat
$cat echo
View 1 Replies
View Related
Jul 3, 2009
apache virtual host to limit the concurrent connections of virtual hosts? Taking into account the host of each virtual user's home directory can also have more than one subdirectory, which should be restricted to a subdirectory. Is beyond the control of the operation of these sites in a subdirectory. Best local restrictions or limitations to the overall situation.
View 1 Replies
View Related
Sep 2, 2010
I am running somes instances of Redis. I want to get Redis stats with following command:
Code:
$ echo "info" | nc <server_IP> <port>
but sometime it returns nothing. The first thing come to my mind is broken pipe or something like this. I always get the result if telnet to Redis and typing 'info' command. I also try pipe viewer to monitor the progress of data but it didn't help:
Code:
$ echo "info" | pv | nc <server_IP> <port>
View 2 Replies
View Related
Jul 27, 2010
I am trying to automate yum update of specific package on a remote machine. Essentially, the script executes, does a yum update, if not needed it would return echo result "update successful", if it needs the update and it installs it without error, it will return echo result "update successful", or if it fails the update it would echo "update failed". So far I have this:
[code]...
This is OK, but I NEED it to just return the final echo "Update successful". I can't have all the other lines. How can I do this?
View 2 Replies
View Related
Aug 1, 2010
I have a dual core processor and would really like to take full advantage from it. I'm pretty sure that only one core is being used when booting and I would like ti know if this is true for the rest of the laptop usage.Furthermore, I tried to follow a tutorial in order to edit/etc/init.d/rc*****Tutorial indicated that one could get the concurrency by changing the value CONCURRENCY=none to CONCURRENCY=shell however the file clearly says that "shell" is not a valid option, so I made no change
View 4 Replies
View Related
Aug 3, 2010
I'm running Windows 7 in VMPlayer under Linux. I made some changes to Windows 7 to allow it to have two people logged in at the same time. However when I do this the sound lags behind on the host machine.
Is there a different version of Windows where I am less likely to have this problem?
View 2 Replies
View Related
Feb 3, 2011
How do I find the maximum number of concurrent connections (in any state)? I'm running RHEL5 2.6.18-194.26.1.el5. Also, does tcp auto tune affect the number of concurrent connections or is it mostly used for dynamic buffer size allocation?
View 3 Replies
View Related
Feb 1, 2011
FTP servers I use frequently have imposed a simultaneous connections limit, usually 5-10 at the time. It was no problem under Windows, since Windows artificially limits allowed FTP connections to ~10 as far as I know. But it is a problem under Linux very much since I cannot find how to limit them :/ So far I used these clients: Native FTP client (Places -> Connect to FTP server). No apparent way to limit connections.
FileZilla. Under particular server settings you can limit number of simultaneous connections. Also you can do that globally in Edit -> Preferences -> Transfers. Problem is, it doesn't work, I still keep getting the 530 Sorry the maximum number of clients (10) for this user are already connected. And netstat shows quite a few simultaneous FileZilla connections no matter that I limited them to 1 both in global and local settings.
NCFTPPUT. 10 successful uploads and hi 530. Total Commander under Wine. Same. NetBeans IDE integrated ftp. Same. Some other crapy FTP clients which names I already forgot. Same. OS is Ubuntu 10.04 So, is there any way to force any of these FTP clients to use less than 10 concurrent connections?
View 1 Replies
View Related
Dec 30, 2010
I have a very simple question .I need to tune Kernel paramaters in RHEL 5 server to increase the number of concurrent connections what is the command to do this .How do i know the defaults and the maximum value i can raise this to.
View 1 Replies
View Related
Jul 26, 2011
I'm looking for a way to store an encrypted filesystem on rsync.net which can be mounted and used by multiple clients concurrently - I've considered and experimented with many different ideas, including code...
but all of them are leading me to what looks like a fundamental theoretical problem: a filesystem with concurrent access needs someone to manage it, and who's going to manage it if I can't trust the server? Or refuse on principle to trust the server? There would need to be some trusted entity communicating with every client and making decisions to keep the filesystem and/or block device consistent, right?
Is my understanding correct, or is there any way of achieving what I'm trying to do?
View 1 Replies
View Related
Feb 28, 2010
I currently have a RHEL 5.4 software development server. A lot of my developers are using windows desktops and they need to run interactive sessions on the server. I need to support between 4-6 concurrent users on the server. I tried doing this with VNC but I was never able to set that up for more than one user at a time.
View 2 Replies
View Related
May 11, 2010
I've read a bit about pseudo terminal but I still don't get it fully, I've found a really sweet article:
[URL]
I thought the two end tty and pty were acting like a pipe so while testing, I opened two terminals:
terminal1: cat /dev/ptyq9
terminal2: echo "test" > /dev/ttyq9
And it worked, terminal 1 printed: "test". But if the pipe is bi-directionnal ( as terminal were echoed back what user was typing), I was expecting to be able to go the other way around:
terminal1: cat /dev/ttyq9
terminal2: echo "test" > /dev/ptyq9
It does not work ! Echoing on pty just terminates the cat on pty. How is the "return" working them ?
View 1 Replies
View Related
Oct 19, 2010
how to echo an '-n' without a new line?
View 8 Replies
View Related
Jun 28, 2015
I can play audio in my alsa system and I can record. To keep things simple, I use arecord to record and aplay to play. So far so good. The problem is, I cannot hear what I am recording as I record it. Is there some way to get the input to be echoed to the output? I would optimally like to be able to do this before recording as well as during, so that I can check the levels, find the part to record on the tape, beforehand.
I have tried a test of my card: I had aplay running in one term and arecord running in another. They both ran fine and when I checked the just-recorded file, it was different audio from what I had been playing. This would indicate that the card is able to input and output at the same time, I think? I've done the usual googling as well as reading through URL... and I have done many passes of trial-and-error on my .asoundrc. The more I look at my .asoundrc, the more it looks like it should be doing what I want, but it is not.
My .asoundrc (which again, does works but does not echo audio input):
Code: Select all# pros: this allows playback and record. Playback of several
# programs at the same time works (their outputs are mixed
# together, mono and stereo mixed to stereo)
#
# cons: input is never echoed!
[code]....
View 1 Replies
View Related