Sponsored Content
Full Discussion: read maps from /proc/pid/
Operating Systems Linux Red Hat read maps from /proc/pid/ Post 302142709 by sanjaykhuntia on Monday 29th of October 2007 08:38:39 AM
Old 10-29-2007
read maps from /proc/pid/

hi,
i hav a query abt reading the contents of /proc/pid/maps file.is there any system apis or functions available to get the data from dat file and parse according to my need. i need name of the .so,Create date of the .so file.,Location of .so file etc.

please provide a good source.
yes i hav RHEL 4.

sanjay
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

NIS Maps

Hello.. I stink at NIS! :) Im having a problem with NIS on solaris 2.X. / SPARC I have some maps that are exported to all clients in the domain. Now I setup a new server and add it as a nis client to the domain. On the NIS server there is a auto_direct map that mounts /usr/local . This is... (4 Replies)
Discussion started by: s93366
4 Replies

2. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies

3. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

4. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

5. UNIX for Dummies Questions & Answers

_/proc/stat vs /proc/uptime

Hi, I am trying to calculate the CPU Usage by getting the difference between the idle time reported by /proc/stat at 2 different intervals. Now the 4th entry in the first line of /proc/stat will give me the 'idle time'. But I also came across /proc/uptime that gives me 2 entries : 1st one as the... (0 Replies)
Discussion started by: coderd
0 Replies

6. Shell Programming and Scripting

does the pid of background process show in /proc?

Hi all, I'm reading <advanced bash scripting> and there is a example to kill a background process in a limited time,as shown below: #! /bin/bash #set -n TIMEOUT=$1 count=0 hanging_jobs & { while ((count < TIMEOUT));do eval ' && ((count = TIMEOUT))' ((count++)) sleep 1... (6 Replies)
Discussion started by: homeboy
6 Replies

7. Shell Programming and Scripting

Closing open file descriptors from /proc/pid/fd

Hi guys, i need to write a shell script that will close file descriptors from /proc/pid/fd will calling exec 4<&- solve the problem ? thanks in advance :) (15 Replies)
Discussion started by: alpha_romeo
15 Replies

8. UNIX for Dummies Questions & Answers

/proc/pid/maps

I think the libc.so is shared between processes, because it is a shared library and OS is engaged for saving memory. But, below, the maps of bash, shows r-xp and r--p rw-p attributes to libc.so which mean private memory space. Can anybody explain this for me? :)cat /proc/$$/maps... (4 Replies)
Discussion started by: vistastar
4 Replies
FBB::OFdStreambuf(3bobcat)			       File Descriptor Output Stream Buffer				FBB::OFdStreambuf(3bobcat)

NAME
FBB::OFdStreambuf - Output stream buffer initialized by a file descriptor SYNOPSIS
#include <bobcat/ofdstreambuf> Linking option: -lbobcat DESCRIPTION
FBB::OFdStreambuf objects may be used as a std::streambuf of std::ostream objects to allow insertions into a file descriptor. File descriptors are not defined within the context of C++, but they can be used on operating systems that support the concept. Realize that using file descriptors introduces operating system dependencies. NAMESPACE
FBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB. INHERITS FROM
std::streambuf ENUMERATION
The public enumeration Mode defined in the class FBB::OFdStreamBuf has the following values: o CLOSE_FD, indicating that the file descriptor used by the object must be closed; o KEEP_FD (the default) indicating that the file descriptor used by the object must not be closed. CONSTRUCTORS
o OFdStreambuf(): This constructor initializes the streambuf, without associating it to a file descriptor, and without using buffering. The member open() can be used to associate the object later on with a file descriptor and optionally a buffer size. When the object is destroyed or if the mode-less overloaded version of the open member is called, the file descriptor will be closed. o OFdStreambuf(Mode mode): This constructor initializes the streambuf, without associating it to a file descriptor, and without using buffering. The member open() can be used to associate the object later on with a file descriptor and optionally a buffer size. When the object is destroyed or if the mode-less overloaded version of the open member is called, the Mode argument determines whether the file descriptor will be closed or will remain open. o OFdStreambuf(int fd, size_t n = 1): This constructor initializes the streambuf, associating it to file descriptor fd, and an optional unget buffer size (by default hav- ing size 1). When open is called subsequently, or if the object is destroyed the provided file descriptor will be closed. o OFdStreambuf(int fd, size_t n = 1): This constructor initializes the streambuf, associating it to file descriptor fd, and an optional unget buffer size (by default hav- ing size 1). When the object is destroyed or if the mode-less overloaded version of the open member is called, the file descriptor will be closed. o OFdStreambuf(int fd, Mode mode, size_t n = 1): This constructor initializes the streambuf, associating it to file descriptor fd, and an optional unget buffer size (by default hav- ing size 1). When the object is destroyed or if the mode-less overloaded version of the open member is called, the Mode argument determines whether the file descriptor will be closed or will remain open. There are no copy or move constructors. MEMBER FUNCTIONS
All members of std::streambuf are available, as FBB::OFdStreambuf inherits from this class. Some of the std::streambuf's member are over- ridden by FBB::OFdStreambuf, see below. o void close(): The file descriptor used by the OFdStreambuf is closed, irrespective of the Mode that was specified when the OFdStreambuf object was constructed. Following close the OFdStreambuf object can no longer be used until one of its open members has been called. o int fd() const: The file descriptor used by the OFdStreambuf object is returned. If the OFdStreambuf is not associated with a file descriptor -1 is returned. o void open(int xfd, size_t n = 1): The streambuf is (re)initialized, using file descriptor fd, and an optional unget buffer size (by default having size 1). When called repeatedly, the Mode specification used whem the object was constructed determines whether the file descriptor will be closed or will remain open. o void open(int xfd, Mode mode, size_t n = 1): The streambuf is (re)initialized, using file descriptor fd, a file descriptor closing parameter and an optional unget buffer size (by default having size 1). Depending on the Mode argument the object's currently used file descriptor will be closed or will remain open when the IFdStreambuf object is destroyed. The overloaded assignment operator is not available. PROTECTED MEMBER FUNCTION
The member listed in this section implements the tasks of the comparably named virtual function in the class's private interface. This sep- arates the redefinable interface from the user-interface. The class OFdStreambuf can, in accordance with Liskov's Substitution Principle, be used as a std:streambuf; but it also offers a facility for classes deriving from OFdStreambuf. This facility is listed here. o int pSync(): The contents of the OFdStreambuf's internal buffer flushed. EXAMPLE
To do FILES
bobcat/ofdstreambuf - defines the class interface SEE ALSO
bobcat(7), ifdstreambuf(3bobcat), ofdstream(3bobcat), std::streambuf BUGS
None reported DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::OFdStreambuf(3bobcat)
All times are GMT -4. The time now is 05:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy