Sponsored Content
Top Forums Programming Measuring memory used by a program? Post 302258397 by Corona688 on Friday 14th of November 2008 12:33:52 PM
Old 11-14-2008
The language being Java makes it a bit more complicated. It's a bit like trying to measure how much memory a BASH script is using; anything you ask except maybe BASH itself would just tell you how much memory BASH is using.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Program/ Memory Problems

I need some advise. I have an application server running several applications. When I try and start a particular application when the others are running I receive the following. This is appearing in the core file that is created. ... (1 Reply)
Discussion started by: dbrundrett
1 Replies

2. Shell Programming and Scripting

Program to find CPU,memory and I/O utilization

Can anyone please help me regarding this .sh script: The shell script should monitor CPU,memory and I/O utilization continuously after a defined time interval and should write it in an output file like excell. (1 Reply)
Discussion started by: Subhayan
1 Replies

3. Programming

how to check memory leak in C program under Unix

Hi, How to detect memory leak in C program under unix ? Thanks (6 Replies)
Discussion started by: useless79
6 Replies

4. Solaris

How to know the size of the program currently executing in memory

hey everybody, i am currently working on solaris 10 os on a m5000 server. my problem is when i want the exact size of a program in execution, i am unable to do it. earlier i thought the RSS field of prstat but because of its large size it cant be the size. pmap -x shows some output but it includes... (2 Replies)
Discussion started by: aryansheikh
2 Replies

5. Programming

Current and Peak Memory consumption of my program?

Hi, my C++ program does some memory consuming tasks and runs several minutes. During execution time, I want to print information on the current memory consumption and peak memory consumption of my program into a logfile. How can I retrieve this information, i.e. which functions are available... (0 Replies)
Discussion started by: DarthVader77
0 Replies

6. Programming

Memory Fault (core dumped) in ttpy program

I´m writing this program in QNX , I`m kinda new to UNIX and programing in general, and when I try to run it it gives me the Memory Fault error. Can anyone help? #include <stdio.h> #include <fcntl.h> void main(void) {int a,ter; char buf; printf("a="); scanf("%d",a); ter=open... (6 Replies)
Discussion started by: GiganteAsesino
6 Replies

7. AIX

Memory limit for C program

Greetings - I'm porting a C application to an AIX (6.1) system, and have bumped into the limits AIX imposes on memory allocation, namely the default limit of 256MB for a process. I'm aware of the compilation flag that allows an application to gain access to up to 8 memory segments (each 256MB,... (4 Replies)
Discussion started by: traviswheeler
4 Replies

8. Programming

Shared memory between two c program

i have to shared a variable between two different c programs with shared memory and i do these: int main() { int a=5,b=7; int buffer; int *point; int shmid; shmid=shmget(IPC_PRIVATE , sizeof(buffer),0666); point=(int *)shmat(shmid,NULL,0); point=a; ... (21 Replies)
Discussion started by: tafazzi87
21 Replies

9. Programming

Help regarding memory leak in this C program

I have written this code in C which reads a very large collection of text files and does some processing. The problem with this code is that there are memory leaks which I am not able to figure out as to where the problem is. When I run this code, and see the memory usage using top command, then I... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies

10. Programming

Size of memory used by a program

Hello, Here is a portion of my code: a=(int *) malloc(dim*dim*sizeof(int)); b=(int *) malloc(dim*dim*sizeof(int)); c=(int *) malloc(dim*dim*sizeof(int)); for(i=0;i<dim;i++) for(j=0;j<dim;j++) c= rand(); for(i=0;i<dim;i++) for(j=0;j<dim;j++) b=rand(); ... (6 Replies)
Discussion started by: chercheur111
6 Replies
acctprc(1M)															       acctprc(1M)

NAME
acctprc, acctprc1, acctprc2 - process accounting SYNOPSIS
DESCRIPTION
reads input in the form described by acct(4), adds login names corresponding to user IDs, then writes for each process an ASCII line giving user ID, login name, prime CPU time (tics), non-prime CPU time (tics), and mean memory size (in memory segment units). If is given, it is expected to contain a list of login sessions in the form described in acctcon(1M), sorted by user ID and login name. If this file is not supplied, it obtains login names from the password file. The information in helps it distinguish among different login names that share the same user ID. reads records in the form written by summarizes them by user ID and name, then writes the sorted summaries to the standard output as total accounting records. combines the functionality of and into one program. It takes the same input format as (but does not accept the ctmp argument) and writes the same output as These commands are typically used as shown below: or EXTERNAL INFLUENCES
Environment Variables For the output of if the user IDs are identical, determines the order in which the user names are sorted. If is not specified in the environment or is set to the empty string, the value of is used as a default. If is not specified or is set to the empty string, a default of ``C'' (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to ``C'' (see environ(5)). WARNINGS
Although it is possible to distinguish among login names that share user IDs for commands run normally, it is difficult to do this for those commands run from for example (see cron(1M)). More precise conversion can be done by faking login sessions on the console via the program in acct(1M). A memory segment of the mean memory size is a unit of measure for the number of bytes in a logical memory segment on a particular proces- sor. The mean memory size may overflow for values greater than FILES
SEE ALSO
acct(1M), acctcms(1M), acctcom(1M), acctcon(1M), acctmerg(1M), acctsh(1M), cron(1M), fwtmp(1M), runacct(1M), acct(2), acct(4), utmp(4). STANDARDS CONFORMANCE
acctprc(1M)
All times are GMT -4. The time now is 12:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy