Skip navigation.
Home
The QNX Community Portal

View topic - showmem execution failed after 2-3 successful executions

Page 1 of 1

showmem execution failed after 2-3 successful executions

PostPosted: Thu Apr 07, 2016 7:29 am
by QNXuser1
While doing some test I observed that showmem execution failed.
I am working on QNX 6.5
My query is - what can be probable reason of failure of showmem?
Two cases are there
1. showmem not able to access shared library
2. showmem failed with error - Filename too long

As per the source code of showmem the second error could be because of fopen call to FILE *f = fopen("memory.use", "rb");

Result of showmem -
# showmem -S
System RAM: 1023M ( 1073737728)
Total Used: 308M ( 323822532)
Used Private: 228M ( 239284892)
Used Shared: 68M ( 72155136)
Other: 11M ( 12382504) (includes IFS and reserved RAM)
# showmem -P | grep -i xyz
1351680 548864 270336 376832 155648 0 577617 xyz
# showmem -S
sh: showmem: Can't access shared library
# showmem -P | grep -i xyz
sh: grep: Can't access shared library
sh: showmem: Can't access shared library
# showmem -S
sh: showmem: cannot execute - Filename too long
# showmem -P | grep -i xyz
sh: can't create pipe - try again
# showmem -S
sh: showmem: cannot execute - Filename too long
#

Regards,
QNXuser1

Re: showmem execution failed after 2-3 successful executions

PostPosted: Thu Apr 07, 2016 11:27 am
by denkelly
Both failures could be due to system out of fd's. Before failure, try running "pidin fd | wc -l" to observe the count of fd's in use. If it is going up, you are leaking file descriptors until system can no long load programs.

Re: showmem execution failed after 2-3 successful executions

PostPosted: Thu Apr 07, 2016 11:55 am
by QNXuser1
fd limit per process is 1000.
I checked the fd count per process and the count is less than 100 (per process)