Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - pidin in memory info: (12 Items)
   
pidin in memory info  
I have 2 identical systems, both from HW and SW point of view.

One of them was booted on 31st Aug, the second one 11th Sept.

The "August" one shows "pidin in" memory information 19/63MB, the "September" one shows 25/63MB. 

Could you find some explanation to this?

pidin shows the same list of processes, with almost the same memory sizes (some proceses are +/- 10kB).

Thanks, PKY
RE: pidin in memory info  
Any files in /dev/shmem ?

> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com]
> Sent: September 16, 2009 7:38 AM
> To: ostech-core_os
> Subject: pidin in memory info
> 
> I have 2 identical systems, both from HW and SW point of view.
> 
> One of them was booted on 31st Aug, the second one 11th Sept.
> 
> The "August" one shows "pidin in" memory information 19/63MB, the
> "September" one shows 25/63MB.
> 
> Could you find some explanation to this?
> 
> pidin shows the same list of processes, with almost the same memory
sizes
> (some proceses are +/- 10kB).
> 
> Thanks, PKY
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post38039
RE: pidin in memory info  
When you say almost the same memory sizes are you referring to the
output from "pidin mem"?  Also, what version are you using?


-----Original Message-----
From: Alexander Koppel [mailto:community-noreply@qnx.com] 
Sent: Wednesday, September 16, 2009 7:40 AM
To: ostech-core_os
Subject: RE: pidin in memory info

Any files in /dev/shmem ?

> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com]
> Sent: September 16, 2009 7:38 AM
> To: ostech-core_os
> Subject: pidin in memory info
> 
> I have 2 identical systems, both from HW and SW point of view.
> 
> One of them was booted on 31st Aug, the second one 11th Sept.
> 
> The "August" one shows "pidin in" memory information 19/63MB, the
> "September" one shows 25/63MB.
> 
> Could you find some explanation to this?
> 
> pidin shows the same list of processes, with almost the same memory
sizes
> (some proceses are +/- 10kB).
> 
> Thanks, PKY
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post38039




_______________________________________________

OSTech
http://community.qnx.com/sf/go/post38040
Re: RE: pidin in memory info  
> When you say almost the same memory sizes are you referring to the
> output from "pidin mem"?  Also, what version are you using?

pidin -f ncd

version 6.3.2 (on both systems)

> 
> 
> -----Original Message-----
> From: Alexander Koppel [mailto:community-noreply@qnx.com] 
> Sent: Wednesday, September 16, 2009 7:40 AM
> To: ostech-core_os
> Subject: RE: pidin in memory info
> 
> Any files in /dev/shmem ?
> 
> > -----Original Message-----
> > From: Pavol Kycina [mailto:community-noreply@qnx.com]
> > Sent: September 16, 2009 7:38 AM
> > To: ostech-core_os
> > Subject: pidin in memory info
> > 
> > I have 2 identical systems, both from HW and SW point of view.
> > 
> > One of them was booted on 31st Aug, the second one 11th Sept.
> > 
> > The "August" one shows "pidin in" memory information 19/63MB, the
> > "September" one shows 25/63MB.
> > 
> > Could you find some explanation to this?
> > 
> > pidin shows the same list of processes, with almost the same memory
> sizes
> > (some proceses are +/- 10kB).
> > 
> > Thanks, PKY
> > 
> > 
> > 
> > _______________________________________________
> > 
> > OSTech
> > http://community.qnx.com/sf/go/post38039
> 
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post38040


RE: RE: pidin in memory info  
Using pidin -f ncd doesn't show the whole picture, each thread has a
stack that also contributes to the total memory in use in the system.
Use "pidin mem"


-----Original Message-----
From: Pavol Kycina [mailto:community-noreply@qnx.com] 
Sent: Wednesday, September 16, 2009 9:48 AM
To: ostech-core_os
Subject: Re: RE: pidin in memory info

> When you say almost the same memory sizes are you referring to the
> output from "pidin mem"?  Also, what version are you using?

pidin -f ncd

version 6.3.2 (on both systems)

> 
> 
> -----Original Message-----
> From: Alexander Koppel [mailto:community-noreply@qnx.com] 
> Sent: Wednesday, September 16, 2009 7:40 AM
> To: ostech-core_os
> Subject: RE: pidin in memory info
> 
> Any files in /dev/shmem ?
> 
> > -----Original Message-----
> > From: Pavol Kycina [mailto:community-noreply@qnx.com]
> > Sent: September 16, 2009 7:38 AM
> > To: ostech-core_os
> > Subject: pidin in memory info
> > 
> > I have 2 identical systems, both from HW and SW point of view.
> > 
> > One of them was booted on 31st Aug, the second one 11th Sept.
> > 
> > The "August" one shows "pidin in" memory information 19/63MB, the
> > "September" one shows 25/63MB.
> > 
> > Could you find some explanation to this?
> > 
> > pidin shows the same list of processes, with almost the same memory
> sizes
> > (some proceses are +/- 10kB).
> > 
> > Thanks, PKY
> > 
> > 
> > 
> > _______________________________________________
> > 
> > OSTech
> > http://community.qnx.com/sf/go/post38039
> 
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post38040






_______________________________________________

OSTech
http://community.qnx.com/sf/go/post38053
Re: RE: RE: pidin in memory info  
I have compared output from pidin mem from both systems.

These are the only differences:
Sept
  704549   1 bin/sh              10r REPLY            144K  108K  8192(516K)*
  360471   1 bin/login           10r REPLY             16K   72K  8192(516K)*
  315414   6 bin/io-net          10r RECEIVE           64K  476K   4096(68K)
  315414   5 bin/io-net          21r RECEIVE           64K  476K  4096(132K)
  315414   4 bin/io-net          10r RECEIVE           64K  476K   4096(68K)
  315414   3 bin/io-net          10r RECEIVE           64K  476K   4096(68K)
  315414   2 bin/io-net          10r RECEIVE           64K  476K  4096(132K)
  315414   1 bin/io-net          10r SIGWAITINFO       64K  476K  8192(516K)*
 
August
  835637   1 bin/login           10r REPLY             16K   72K  8192(516K)*
  835608   1 bin/login           10r REPLY             16K   72K  8192(516K)*
  761892   1 cpuLoad             10r NANOSLEEP         12K  104K   12K(516K)*
  368662   6 bin/io-net          10r RECEIVE           64K  516K   4096(68K)
  368662   5 bin/io-net          21r RECEIVE           64K  516K  4096(132K)
  368662   4 bin/io-net          10r RECEIVE           64K  516K   4096(68K)
  368662   3 bin/io-net          10r RECEIVE           64K  516K   4096(68K)
  368662   2 bin/io-net          10r RECEIVE           64K  516K  4096(132K)
  368662   1 bin/io-net          10r SIGWAITINFO       64K  516K  8192(516K)*


> Using pidin -f ncd doesn't show the whole picture, each thread has a
> stack that also contributes to the total memory in use in the system.
> Use "pidin mem"
> 
> 
> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com] 
> Sent: Wednesday, September 16, 2009 9:48 AM
> To: ostech-core_os
> Subject: Re: RE: pidin in memory info
> 
> > When you say almost the same memory sizes are you referring to the
> > output from "pidin mem"?  Also, what version are you using?
> 
> pidin -f ncd
> 
> version 6.3.2 (on both systems)
> 
> > 
> > 
> > -----Original Message-----
> > From: Alexander Koppel [mailto:community-noreply@qnx.com] 
> > Sent: Wednesday, September 16, 2009 7:40 AM
> > To: ostech-core_os
> > Subject: RE: pidin in memory info
> > 
> > Any files in /dev/shmem ?
> > 
> > > -----Original Message-----
> > > From: Pavol Kycina [mailto:community-noreply@qnx.com]
> > > Sent: September 16, 2009 7:38 AM
> > > To: ostech-core_os
> > > Subject: pidin in memory info
> > > 
> > > I have 2 identical systems, both from HW and SW point of view.
> > > 
> > > One of them was booted on 31st Aug, the second one 11th Sept.
> > > 
> > > The "August" one shows "pidin in" memory information 19/63MB, the
> > > "September" one shows 25/63MB.
> > > 
> > > Could you find some explanation to this?
> > > 
> > > pidin shows the same list of processes, with almost the same memory
> > sizes
> > > (some proceses are +/- 10kB).
> > > 
> > > Thanks, PKY
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > 
> > > OSTech
> > > http://community.qnx.com/sf/go/post38039
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 
> > OSTech
> > http://community.qnx.com/sf/go/post38040
> 
> 
> 
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post38053


RE: RE: RE: pidin in memory info  
You've accounted for 3.2M(pidin in might consider this to be 4M?) of the
6M in /dev/shmem(which doesn't show up in pidin -f ncd), and the
granularity of pidin in is 1M(I believe it rounds down) ...


Try the following to get a more accurate view of the memory in use:

#include <errno.h>
#include <stdint.h>
#include <unistd.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/syspage.h>

uint64_t
get_free_mem (void)
{
        int ret;
        struct stat64 sbuf;
        ret = stat64("/proc", &sbuf);
        if (ret == -1) {
                printf("stat(/proc) failed: %s", strerror(errno));
        }
        return sbuf.st_size;
}

uint64_t
get_total_mem (void)
{
        char *str = SYSPAGE_ENTRY(strings)->data;
        struct asinfo_entry     *as = SYSPAGE_ENTRY(asinfo);
        uint64_t total = 0;
        unsigned num;

        for (num = _syspage_ptr->asinfo.entry_size / sizeof(*as); num >
0; --num) {
                if(strcmp(&str[as->name], "ram") == 0) {
                        total += as->end - as->start + 1;
                }
                ++as;
        }
        return total;
}

int
main (int argc, char **argv)
{
        uint64_t free_mem = get_free_mem();
        uint64_t total_mem = get_total_mem();
        printf("FreeMem/TotalMem: %llu/%llu\n", free_mem,total_mem );
        printf("Total Mem In Use: %llu bytes\n",total_mem-free_mem );
        return EXIT_SUCCESS;
}



-----Original Message-----
From: Pavol Kycina [mailto:community-noreply@qnx.com] 
Sent: Wednesday, September 16, 2009 2:58 PM
To: ostech-core_os
Subject: Re: RE: RE: pidin in memory info

I have compared output from pidin mem from both systems.

These are the only differences:
Sept
  704549   1 bin/sh              10r REPLY            144K  108K
8192(516K)*
  360471   1 bin/login           10r REPLY             16K   72K
8192(516K)*
  315414   6 bin/io-net          10r RECEIVE           64K  476K
4096(68K)
  315414   5 bin/io-net          21r RECEIVE           64K  476K
4096(132K)
  315414   4 bin/io-net          10r RECEIVE           64K  476K
4096(68K)
  315414   3 bin/io-net          10r RECEIVE           64K  476K
4096(68K)
  315414   2 bin/io-net          10r RECEIVE           64K  476K
4096(132K)
  315414   1 bin/io-net          10r SIGWAITINFO       64K  476K
8192(516K)*
 
August
  835637   1 bin/login           10r REPLY             16K   72K
8192(516K)*
  835608   1 bin/login           10r REPLY             16K   72K
8192(516K)*
  761892   1 cpuLoad             10r NANOSLEEP         12K  104K
12K(516K)*
  368662   6 bin/io-net          10r RECEIVE           64K  516K
4096(68K)
  368662   5 bin/io-net          21r RECEIVE           64K  516K
4096(132K)
  368662   4 bin/io-net          10r RECEIVE           64K  516K
4096(68K)
  368662   3 bin/io-net          10r RECEIVE           64K  516K
4096(68K)
  368662   2 bin/io-net          10r RECEIVE           64K  516K
4096(132K)
  368662   1 bin/io-net          10r SIGWAITINFO       64K  516K
8192(516K)*


> Using pidin -f ncd doesn't show the whole picture, each thread has a
> stack that also contributes to the total memory in use in the system.
> Use "pidin mem"
> 
> 
> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com] 
> Sent: Wednesday, September 16, 2009 9:48 AM
> To: ostech-core_os
> Subject: Re: RE: pidin in memory info
> 
> > When you say almost the same memory sizes are you referring to the
> > output from "pidin mem"?  Also, what version are you using?
> 
> pidin -f ncd
> 
> version 6.3.2 (on both systems)
> 
> > 
> > 
> > -----Original Message-----
> > From: Alexander Koppel [mailto:community-noreply@qnx.com]...
View Full Message
Re: RE: RE: RE: pidin in memory info  
I have run the program on both systems:

August:
18030592/66190336
48159744

Sept:
26337280/66190336
39853056


"pidin -p procnto mem" shows for code and data zero values for all threads, for stack it shows thread_1  0(320) and all 
other threads 0(8182).

In 6.4.1 pidin shows non zero values for procnto. Is there any way to find out the real values of procnto in 6.3.2?


Thanks, PKY



> You've accounted for 3.2M(pidin in might consider this to be 4M?) of the
> 6M in /dev/shmem(which doesn't show up in pidin -f ncd), and the
> granularity of pidin in is 1M(I believe it rounds down) ...
> 

[snip]
RE: RE: RE: RE: pidin in memory info  
There was a bug in proc in 6.3.2, so there really isn't any way to tell
how much memory procnto is using...except to assume that all unaccounted
for memory is being used by proc ;-)


-----Original Message-----
From: Pavol Kycina [mailto:community-noreply@qnx.com] 
Sent: Thursday, September 17, 2009 1:34 AM
To: ostech-core_os
Subject: Re: RE: RE: RE: pidin in memory info

I have run the program on both systems:

August:
18030592/66190336
48159744

Sept:
26337280/66190336
39853056


"pidin -p procnto mem" shows for code and data zero values for all
threads, for stack it shows thread_1  0(320) and all other threads
0(8182).

In 6.4.1 pidin shows non zero values for procnto. Is there any way to
find out the real values of procnto in 6.3.2?


Thanks, PKY



> You've accounted for 3.2M(pidin in might consider this to be 4M?) of
the
> 6M in /dev/shmem(which doesn't show up in pidin -f ncd), and the
> granularity of pidin in is 1M(I believe it rounds down) ...
> 

[snip]



_______________________________________________

OSTech
http://community.qnx.com/sf/go/post38127
Re: RE: RE: RE: RE: pidin in memory info  
Thanks,

How much memory should be used by proc?
Should it be constant, or can it grow over the time?

It seems to me, that proc is consuming more and more memory. 
In 6.4.1 I have 3 identical systems which started with data segment size at about 2.5MB, one day later it was about 4.
5MB and today it was 6.5MB. I am just curios what that size will be tomorrow.  (Up to now I haven't found anything 
suspicious in "pidin -f n[" output ... queues don't get bigger and bigger)

As there's no easy way to find info about proc memory usage in 6.3.2 I am just wondering if the difference I reported 
between August and Sept system could be of the same type.

I will keep posting.

PKY   

> There was a bug in proc in 6.3.2, so there really isn't any way to tell
> how much memory procnto is using...except to assume that all unaccounted
> for memory is being used by proc ;-)
> 
> 
> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com] 
> Sent: Thursday, September 17, 2009 1:34 AM
> To: ostech-core_os
> Subject: Re: RE: RE: RE: pidin in memory info
> 
> I have run the program on both systems:
> 
> August:
> 18030592/66190336
> 48159744
> 
> Sept:
> 26337280/66190336
> 39853056
> 
> 
> "pidin -p procnto mem" shows for code and data zero values for all
> threads, for stack it shows thread_1  0(320) and all other threads
> 0(8182).
> 
> In 6.4.1 pidin shows non zero values for procnto. Is there any way to
> find out the real values of procnto in 6.3.2?
> 
> 
> Thanks, PKY
> 
> 
> 
> > You've accounted for 3.2M(pidin in might consider this to be 4M?) of
> the
> > 6M in /dev/shmem(which doesn't show up in pidin -f ncd), and the
> > granularity of pidin in is 1M(I believe it rounds down) ...
> > 
> 
> [snip]
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post38127


RE: RE: RE: RE: RE: pidin in memory info  
The memory used by procnto depends(it can grow) on what you are doing in
your system.


-----Original Message-----
From: Pavol Kycina [mailto:community-noreply@qnx.com] 
Sent: Thursday, September 17, 2009 3:12 PM
To: ostech-core_os
Subject: Re: RE: RE: RE: RE: pidin in memory info

Thanks,

How much memory should be used by proc?
Should it be constant, or can it grow over the time?

It seems to me, that proc is consuming more and more memory. 
In 6.4.1 I have 3 identical systems which started with data segment size
at about 2.5MB, one day later it was about 4.5MB and today it was 6.5MB.
I am just curios what that size will be tomorrow.  (Up to now I haven't
found anything suspicious in "pidin -f n[" output ... queues don't get
bigger and bigger)

As there's no easy way to find info about proc memory usage in 6.3.2 I
am just wondering if the difference I reported between August and Sept
system could be of the same type.

I will keep posting.

PKY   

> There was a bug in proc in 6.3.2, so there really isn't any way to
tell
> how much memory procnto is using...except to assume that all
unaccounted
> for memory is being used by proc ;-)
> 
> 
> -----Original Message-----
> From: Pavol Kycina [mailto:community-noreply@qnx.com] 
> Sent: Thursday, September 17, 2009 1:34 AM
> To: ostech-core_os
> Subject: Re: RE: RE: RE: pidin in memory info
> 
> I have run the program on both systems:
> 
> August:
> 18030592/66190336
> 48159744
> 
> Sept:
> 26337280/66190336
> 39853056
> 
> 
> "pidin -p procnto mem" shows for code and data zero values for all
> threads, for stack it shows thread_1  0(320) and all other threads
> 0(8182).
> 
> In 6.4.1 pidin shows non zero values for procnto. Is there any way to
> find out the real values of procnto in 6.3.2?
> 
> 
> Thanks, PKY
> 
> 
> 
> > You've accounted for 3.2M(pidin in might consider this to be 4M?) of
> the
> > 6M in /dev/shmem(which doesn't show up in pidin -f ncd), and the
> > granularity of pidin in is 1M(I believe it rounds down) ...
> > 
> 
> [snip]
> 
> 
> 
> _______________________________________________
> 
> OSTech
> http://community.qnx.com/sf/go/post38127






_______________________________________________

OSTech
http://community.qnx.com/sf/go/post38211
Re: RE: pidin in memory info  
> Any files in /dev/shmem ?


Yes, there are some files there:

output of "du -ks /tmp/ " for 
August system: 10652
September system: 7409

the difference in /tmp/ is about 3MB, but in pidin it's 6MB

> 
> > -----Original Message-----
> > From: Pavol Kycina [mailto:community-noreply@qnx.com]
> > Sent: September 16, 2009 7:38 AM
> > To: ostech-core_os
> > Subject: pidin in memory info
> > 
> > I have 2 identical systems, both from HW and SW point of view.
> > 
> > One of them was booted on 31st Aug, the second one 11th Sept.
> > 
> > The "August" one shows "pidin in" memory information 19/63MB, the
> > "September" one shows 25/63MB.
> > 
> > Could you find some explanation to this?
> > 
> > pidin shows the same list of processes, with almost the same memory
> sizes
> > (some proceses are +/- 10kB).
> > 
> > Thanks, PKY
> > 
> > 
> > 
> > _______________________________________________
> > 
> > OSTech
> > http://community.qnx.com/sf/go/post38039