General :: File Descriptors With Pipes

Jun 4, 2010

File descriptors with pipes-Can someone help me with this three situations, what would happen?

a) a process open the same file twice and read through two file descriptors
b) a process does fork and both parent- and child-processes read parallell
c) two processes opens and read from same file.

View 5 Replies


ADVERTISEMENT

General :: Program That Reads Multiple Pipes / File Descriptors And Writes To Standard Output

Feb 23, 2011

Is there already a program that reads multiple pipes or file descriptors and writes to the standard output (not splitting lines).Like cat, but reading all files simultaneously and preserving lines.It is needed to avoid coding of select/epoll loops or using multithreading in simple programs. Like "select loop for bash".

View 1 Replies View Related

General :: How Many File Descriptors Accessing A Given File

Nov 28, 2010

On linux, is there a way to count the number of file descriptors open to a some file?

View 1 Replies View Related

General :: Fork Behavior While Copying File Descriptors

Jun 17, 2010

I am quite confused about the following description on fork. Could you please explain it ?The child process shall have its own copy of the parent's file descriptors. Each of the child's file descriptors shall refer to the same open file description with the corresponding file descriptor of the parent.For example, I am opening a socket and then fork. Now, does the child have a separate socket or is shares it with the parent. Does I have any impact on using it in child?

View 2 Replies View Related

Ubuntu :: How Can Max File Descriptors Be Set

Jan 14, 2010

I have run into a limit of 1024 file descriptors. I have searched a lot and have tried various solutions.How can the max file descriptors be set in Ubuntu?

View 1 Replies View Related

Red Hat :: Default File Descriptors

Sep 2, 2009

Can someone please tell me how to permanently increase the default file descriptors limit on RHEL4?right now ulimit -n is 1024...I'd like to increase it to around 10000

View 1 Replies View Related

Server :: Runing Out File Descriptors

Nov 9, 2010

Its my Friend Problem .any one can tells that how can the file descriptors limits can be raise for the squid. In cache.log running out of file descriptors warning is coming.

View 3 Replies View Related

Software :: Free File Descriptors Constantly Zero

May 24, 2010

I am using sabayon 5 - 32bit OS. I experience dullness and sluggish performance now and then.So number of free file descriptors is constantly zero , checked by utilising a while loop sleeping for 5 secs.would this be the root cause of the sluggishness I face in accessing application (media player)Also USB transfer is very very slow and sometimes it gets stuck

View 1 Replies View Related

Software :: No Standard File Descriptors For Init

Jan 10, 2011

I have a weird problem with one of my servers. When system is booted and right before I should se "INIT 2.86 starting..." message, all the messages disappear. Only kernel messages get logged to console and later login prompt, but nothing in betweek (there are 20+ services starting successfully, just without emitting a single character).I checked /proc/PID/fd of the boot script (in my case called /etc/rc.d/rc.boot but that does not matter).

The only significant difference in hardware to other servers is that this one runs RV350 AP [Radeon 9600] graphic card.Now, my question is: where could those FDs go or why are they not opened?Does anyone have a clue about this, or a hint?

View 5 Replies View Related

Red Hat / Fedora :: Any Limitation On Number Of File Descriptors That Can Be Opened

Dec 23, 2008

Is there any limitation on the number of file descriptors that can be opened. If yes how to find the maximum number of file descriptors that can be opened at a time.

View 2 Replies View Related

Server :: Total Free Allocated File Descriptors Always Zero

Jul 23, 2010

I have problem with free allocated file descriptors it's always zero!

View 2 Replies View Related

Programming :: Kernel Module - Task_struct / Files Struct, Open_fds, And The Open File Descriptors In Task?

May 1, 2010

This for Kernel 2.6.29.6. I'm trying to code a kernel module that displays process information.

how to count opened file descriptors per task. I have been able to write a module that lists all the current process names along with their pid number in /var/log/messages. Basically, I cycle through the ring of processes using the macro for_each_process(task) and printk the comm and pid of each task. I'm trying to see how many file descriptors each task has open. I've been reading up in books and all over the internet. At first I thought I needed to access max_fds under files_struct, but that just lists the maximum number of file descriptors that can be opened per task, which by default is set at 256. I then thought about counting the elements in the fd_array. But then I learned that every task's fd_array is initially set at 32. Now I know that I need to access open_fds of type fd_set * in files_struct. open_fds is a pointer to all the open file descriptors. The problem is that I don't know how to access a pointer of type fd_set.

Is there a good guide or book that really focuses on type fd_set and open_fds? Every book and resource I've read never really go into depth on this. relationship between files struct, open_fds, and the open file descriptors in task?

View 4 Replies View Related

General :: Difference Between Pipes And Redirects

Apr 30, 2011

I've been using pipes and redirects for a long time and just realized that I don't know exactly how they are different. I just know that if you want to store the output in a file, then you use >. Otherwise most of the time you just use |. difference between pipes and redirects?

View 1 Replies View Related

General :: Pipes And Redirect / When To Use Theses?

Jul 31, 2011

Although this is a basic stuff, but still i wonder.
Consider these two examples. code...

I wonder, why doesn't redirection work in first case? when to use redirect and when to use pipes? I have been Linux for a long time, but still this basic stuff baffles me.

View 2 Replies View Related

General :: Strange Using Pipes With Ssh As Root?

Jan 31, 2011

has anyone seen this before, when running an ssh command as normal user via ssh i get results:

ssh picolo 'ls -d /var/sadm/pkg/* | egrep "Prod|Dev|UAT" |cut -d/ -f5;uname -r;grep -v "^#" /opt/Tivoli/lcf/dat/1/DMXAdaptiveFileSystem.dat'>>sshnotroot
and it creates file
more sshnotroot
Prod
5.10

[Code]...

View 3 Replies View Related

General :: Use Named Pipes On System Network?

Jun 24, 2010

How to create and use named pipe on linux network.ie
client - my linux machine
server - my fren's linux machine

how to communicate between these two using named pipe created in C? do u have any similar code snippet written in C??

i got one server client application,its working fine on my machine.So i want enhance that code for networking.so help in this...

View 6 Replies View Related

General :: How Long Do FIFOs - Named Pipes - Stay "open" For

Aug 2, 2011

For example, I have a script that writes the time to a pipe in /etc/pipe. It writes continuously in a while true loop. How long will the data in the pipe be available for reading? If I only decide to read the pipe a day later with cat /etc/pipe, will I get all the time values right from the time I started writing?

Conversely, what if my loop only wrote the time every 10 minutes. Will I be able to access everything a day later?

Finally, pretend my loop writes the time continuously (like my first example) and I read the pipe every 30 minutes. If my computer shuts down right before I read the pipe, will the pipe be empty when I reboot or will it hold all that data?

View 1 Replies View Related

Ubuntu :: Netcat Output Pipes And Redirection ?

May 25, 2010

I'm trying to redirect nc command output but I can't do it.

I have tried this:

And this:

But it seems doesn't work.

View 3 Replies View Related

Networking :: Combine Two Network Pipes For MegaSpeed?

Apr 14, 2011

I have two sources of internet which I want to share and balance the load on. With one source it's easy: plug it into the wireless router and Bob's your uncle. But how would you handle two sources and get load balancing? A switch? Would that really share the load?

View 4 Replies View Related

Programming :: Store Output Of Command With Pipes?

Jan 20, 2011

I need to find one RUNNING word in latest created logs.
and as soon as i will get RUNNING WORD , i have to execute another Unix Command.

I wrote following script code...

View 3 Replies View Related

Programming :: Shellscripting: Pipes And Output Redirection?

Aug 21, 2010

see these simple commands:

Code:
# dbus-monitor --system >> /data/eject.txt
This one works as expected ... dbus-monitor never terminates and whenever it outputs new lines, they are

[code]....

View 3 Replies View Related

OpenSUSE :: EXT4 Group Descriptors Corrupted

Jul 19, 2011

I have a second HD partitioned and formated to EXT4, the whole capacity. It was mounted to a directory in my home folder I'm getting an error that it cannot be mounted.

Running "dmesg | tail" i get this: (rigt now the HD is connected to the computer using a USB adaptor)

Code:
laptop:~> dmesg | tail
[ 375.821495] sd 9:0:0:0: [sdb] Write Protect is off
[ 375.821505] sd 9:0:0:0: [sdb] Mode Sense: 00 38 00 00
[ 375.821512] sd 9:0:0:0: [sdb] Assuming drive cache: write through

[code].....

View 9 Replies View Related

Hardware :: EXT3-fs: Group Descriptors Corrupted

Jan 31, 2010

i have an external harddrive, hooked up by usb. /dev/sdb it came as a fat drive (sdb1). when i realized, i had copied 250 gb to it already. so, i made a new ext3 (sdb2) partition, copied the data from the fat to ext3, and then deleted the fat drive and moved the ext3 it with gparted. it mounted fine after it was moved, but after i tried to resize it, which didn't work, it will not mount.

[Code]....

View 1 Replies View Related

Programming :: Difference Between Message Queues And Named Pipes

Mar 1, 2011

recently I had been to interview where I had a question to be answered, that what are advantages and disadvantages when desiging an application in linux.

View 1 Replies View Related

Server :: Frequent Broken Pipes From SSH Connection After Power Loss?

Apr 19, 2011

I have three machines networked to my desktop which run a bunch of simulations in parallel. As they're running, I connect to them via SSH and screen to keep an eye on the runs and look at the output. They stay usually connected for days at a time. The SSH servers and client are running Fedora 14. Yesterday one of my coworkers accidentally yanked the plug on one of the servers while it was running. When I powered it up again, I started getting some odd connection problems. I couldn't connect to it via SSH initially because I got the Remote Host Identification Changed (RSA host key changed) error. I deleted the key in .ssh/known_hosts, which allowed me to connect, but it denied my password. I then logged into that machine locally, restarted sshd, and removed .ssh/known_hosts again. Now I can log in via SSH without problems. However, the connection dies with a "Write failed: Broken pipe" error every few minutes (as opposed to the other two machines, which stay connected indefinitely).

So my questions are:
1.) why would a power loss affect the behavior of the SSH server?
2.) why do I keep getting broken pipes now?

View 4 Replies View Related

General :: Generated .exe File From C File - Run .exe File When Linux System Starts Up?

Apr 6, 2010

i have generated .exe file from C file (ie filename.c ) after compiling in linux machine with -O option. I wish to know about how to run that .exe file when linux system starts up ?

View 3 Replies View Related

General :: Convert Fdf File To Xsf File Or Xyz File On Ubuntu 9.10_32 Bit?

Nov 7, 2010

I want to convert fdf file to xsf file or xyz file on ubuntu 9.10_32 bit .

View 5 Replies View Related

General :: Cannot Open File In RW Mode - Filling Root File System With Log Files

Nov 3, 2010

I work for a company that makes portable devices running Linux and I was recently asked to make the underlying file system read-only for "security" purposes. Since the distribution is based on LinuxFromScratch, I know that very little writing happens at run time. So, even if the device runs on a usb flash device, I doubt that putting the root file system RO will be that beneficial. I am actually more concerned about a process actually breaking because it cannot open a file in RW mode than a process going rogue and filling the root file system with log files, etc. I'd really like to ear what kind of advantages disadvantages there really is with read-only file-systems.

View 6 Replies View Related

General :: Unable To Access File /home/username/.iceauthority: No Such File Or Directory

Apr 21, 2011

Can't log into my XFCE desktop like I normaly do. all the sudden I get notified that my xsession lasted less then 10 secondsLooking at the error I can see this:

Unable to access file /home/username/.iceauthority: No such file or directory

Using failsafe I can start a terminal. From terminal I tried to start X

Code: sudo startx Result: Running on desplay:0

So I tried to run this;

Code: sudo startxfce4 And I get up a graphical desktop.

So this is not a critical situation as I easily can use this method to log on, but as there has been something causing this I would like to be able to resolve this nonetheless. Btw it is not the old chmod trick in play here, cause my .iceauthority file is gone alltogheter.

View 6 Replies View Related

General :: 6.13 GMP-5.0.0 LFS Make Error - Cannot Open Shared Object File: No Such File Or Directory

Jun 10, 2010

I'm currently stuck at 6.13 GMP-5.0.0 of the LFS installation. After running make, I receive the following:

error while loading shared libraries: libbfd-2.20.so: cannot open shared object file: No such file or directory
make[2]: *** [libmpn.la] Error 127
make[2]: Leaving directory `/sources/gmp-5.0.0/mpn'

[code]....

View 5 Replies View Related







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