- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to find How much memory can a process use
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 12:00 AM
07-11-2007 12:00 AM
how to find How much memory can a process use
How to find How much memory can a process use
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 12:16 AM
07-11-2007 12:16 AM
Re: how to find How much memory can a process use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 01:36 AM
07-11-2007 01:36 AM
Re: how to find How much memory can a process use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 02:00 AM
07-11-2007 02:00 AM
Re: how to find How much memory can a process use
Also check the user limit for the user that the process runs as.
Login as the user (or su - username) and run ulimit -a
Regards
Andrew Y
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 02:16 AM
07-11-2007 02:16 AM
Re: how to find How much memory can a process use
UNIX95=1 ps -e -o vsz,pid,comm | sort -rn | pg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2007 02:18 AM
07-11-2007 02:18 AM
Re: how to find How much memory can a process use
this is a complex question
I wrote program bellow to see it.
text size (3th field) is share among all insances, data, stack and uarea are private.
Jean-Yves Picard
/* compile with (if 64 Bit): cc +DA2.0W -D_PSTAT64 -o my_ps my_ps.c */
#include
#include
#include
#include
#define BURST ((size_t)10)
main() {
long gid ;
struct pst_status pst[10];
int retour ;
{
int i, count;
int idx = 0; /* index within the context */
int c = 0 ;
char *lignecomm ;
/* loop until count == 0, will occur all have been returned */
while ((count=pstat_getproc(pst, sizeof(struct pst_status),BURST,idx))>0) {
/* got count (max of BURST) this time. process them */
for (i = 0; i < count; i++) {
lignecomm=pst[i].pst_cmd ;
if ( lignecomm[0] == 10 ) lignecomm = &(pst[i].pst_cmd[1]) ;
(void)printf("%3d :pid is %d,\n",c++, pst[i].pst_pid );
(void)printf("\t ligne de commande %s \n",lignecomm);
(void)printf("\t executable est %s \n",pst[i].pst_ucomm);
printf ("! \t%d",pst[i].pst_pid);
printf ("\t%d",pst[i].pst_dsize);
printf ("\t%d",pst[i].pst_tsize);
printf ("\t%d",pst[i].pst_ssize);
printf ("\t%d",pst[i].pst_usize);
(void)printf("\t%s",pst[i].pst_ucomm);
(void)printf("\t%s\n",lignecomm);
/* (void)printf("%3d :pid is %d, command is %s\n",c++, pst[i].pst_pid, pst[i].pst_ucomm);*/
}
/*
* now go back and do it again, using the next index after
* the current 'burst'
*/
idx = pst[count-1].pst_idx + 1;
}
if (count == -1)
perror("pstat_getproc()");
}
}