Pipes

hi , we have a process which uses Linux Pipes, and often terminates without any logs, we want to know if the linux pipes uses the shared memory which is administered through IPCS.

Thank you
Jonu Joy

As far as I know pipes (named or anonymous) do not use shared memory at all.

Which version (and service/support pack level) of SLES are you using?

What is the program you are using?

Why do you think pipes are involved (any tests you’ve done to focus on
that already?)?


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

we are using

SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 2

we have an SAP process which is migrating the database from oracle to HANA and it created the following files

prwx------ 1 aaxadm sapsys 0 Apr 21 11:20 MIGRATE_DT_00008.PIPE
prwx------ 1 aaxadm sapsys 0 Apr 21 11:20 MIGRATE_DT_00007.PIPE
prwx------ 1 aaxadm sapsys 0 Apr 21 11:20 MIGRATE_DT_00006.PIPE

the process breaks sometimes and we wanted to know if it uses shared memory at all so that we can tweak it, if named pipes dosent use shared memory at all (IPCS), then no need to bother about it .

Hi jonujoy,

as ab already wrote, named pipes aren’t using shared memory. You can check the system’s maximum buffer for named pipes via

cat /proc/sys/fs/pipe-max-size

but that’s only the upper limit - the processes can use fcntl() to change to a value below that. If that buffer fills up (because the receiving end is consuming too slow), the sending end ought to block.

You might consider to attach to the running process via “strace” or “gdb” to see if the process terminates regularly, as opposed to after receiving a signal.

Regards,
Jens

thx much , so the max memory a pipe can use is controlled by /proc/sys/fs/pipe-max-size, and is there a way to check how much memory a named pipe is using at the moment .

Hi jonujoy,

is there a way to check how much memory a named pipe is using at the moment

I know of no way to check the current buffer size of a given named pipe nor a way to check how much of that is currently used. You might want to check the kernel source to see if there’s such an interface at all and if yes, we might find a way to call it…

Regards,
Jens