Sponsored Content
Operating Systems Solaris Logging the memory consumed by a process with c/C++ without using proc Post 302910799 by achenle on Monday 28th of July 2014 09:57:01 AM
Old 07-28-2014
Write your own kernel modules to duplicate the functionality of the /proc file system?

Because the /proc file system is designed to be the interface used to get such data. It's how utilities like "ps" get data, and even debuggers use the /proc file system as an interface into the processes they're being used to debug.

So you can't even use "ps" or a debugger to get that information without using the /proc file system.
 

10 More Discussions You Might Find Interesting

1. Solaris

1. To know the Memory consumed by a process at a time

hello I am new to the UNIX I want to know what command is used 1.To know the Memory consumed by a process at a time . 2.To know the How many CPU's in a server. 3.To know the RAM size. 4.To know the Hard Disk size. (3 Replies)
Discussion started by: maheshkoushik
3 Replies

2. UNIX for Advanced & Expert Users

the amount of memory consumed per user

Hi, under UNIX AIX how determine the amount of memory consumed per user ? Many thanks before. (1 Reply)
Discussion started by: big123456
1 Replies

3. Programming

serializing logging output mult. proc. inst deamon

Hello, i have an interresting topic today C++ on solaris. lgpl stuff applicable. My program is a deamon process wich takes input from network, then processes the data, and outputs reformatted to network. We're generating a lot of logging output. the logging is absolutely unbuffered at the... (3 Replies)
Discussion started by: heck
3 Replies

4. HP-UX

Order process by consumed memory

Hi! I am new to HP-UX. :o By using the command glance, I found the user memory usage was very high. I would like to know is there any command can show the process which consume most available memory ? (Just like the command top, but order by memory, not CPU) (1 Reply)
Discussion started by: alfredo
1 Replies

5. Shell Programming and Scripting

Most time consumed process

Hi All, I have a simple question on unix command. Here, I need to find the most time consumed process running at present in my HP -UX server. Though it is possible through top command but to redirect the output I want the same done through some command like ps -aef. Also I need the user who... (2 Replies)
Discussion started by: Sreejith_VK
2 Replies

6. Shell Programming and Scripting

How can I obtain the consumed memory of a process?

Hi!!! how can I obtain the consumed memory of a process? nowadays i'm using ps -efo pid, pmem, comm,args .... but the information is in percentage, is that correct? so, i want to know how can obtain the consumed memory of a process in mb? thanks in advance! Richard (3 Replies)
Discussion started by: rcrutz_18
3 Replies

7. 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

8. Shell Programming and Scripting

Shell script for logging cpu and memory usage of a Linux process

I am looking for a way to log and graphically display cpu and RAM usage of linux processes over time. Since I couldn't find a simple tool to so (I tried zabbix and munin but installation failed) I started writing a shell script to do so The script file parses the output of top command through... (2 Replies)
Discussion started by: andy_dufresne
2 Replies

9. AIX

Process, PID and total memory consumed on AIX.

Hi, Below is the code snippet I use on Linux (Centos) to retrieve the Process Name, PID and memory consumed on Linux (Centos) host:- top -b -n 1 | awk -v date="$tdydate" -v ip="$ip" 'NR>7 {print date","ip","$12,","$1,","$10}' Any idea how the same can be retrieved on an AIX host? This... (1 Reply)
Discussion started by: Vipin Batra
1 Replies

10. UNIX for Advanced & Expert Users

Command to check memory used or consumed by OS kernel

I am trying to check how much memory is consumed by OS Kernel using below command, Is this the correct command that I'm using grep Slab /proc/meminfo Output : Slab: 3106824 kB IF I convert KB to GB, It means 2.9 GB of RAM is consumed Below details for reference ... (4 Replies)
Discussion started by: sam@sam
4 Replies
Tcl_CreateCloseHandler(3)				      Tcl Library Procedures					 Tcl_CreateCloseHandler(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_CreateCloseHandler, Tcl_DeleteCloseHandler - arrange for callbacks when channels are closed SYNOPSIS
#include <tcl.h> void Tcl_CreateCloseHandler(channel, proc, clientData) void Tcl_DeleteCloseHandler(channel, proc, clientData) ARGUMENTS
Tcl_Channel channel (in) The channel for which to create or delete a close callback. Tcl_CloseProc *proc (in) The procedure to call as the callback. ClientData clientData (in) Arbitrary one-word value to pass to proc. _________________________________________________________________ DESCRIPTION
Tcl_CreateCloseHandler arranges for proc to be called when channel is closed with Tcl_Close or Tcl_UnregisterChannel, or using the Tcl close command. Proc should match the following prototype: typedef void Tcl_CloseProc( ClientData clientData); The clientData is the same as the value provided in the call to Tcl_CreateCloseHandler. Tcl_DeleteCloseHandler removes a close callback for channel. The proc and clientData identify which close callback to remove; Tcl_Delete- CloseHandler does nothing if its proc and clientData arguments do not match the proc and clientData for a close handler for channel. SEE ALSO
close(n), Tcl_Close(3), Tcl_UnregisterChannel(3) KEYWORDS
callback, channel closing Tcl 7.5 Tcl_CreateCloseHandler(3)
All times are GMT -4. The time now is 10:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy