02-06-2009
Hmm, when a command as small as "/usr/bin/rm" does not fit into memory any more (as per your first post here) there is something seriously wrong.
If the problem goes away temporarily with a reboot chances are you have a memory leak problem. To track this sort of problems down is sometimes hard, because of the ephemeral nature of these. You could wait until the problem shows up and then use "ps -Alo vsz<,other options>" to get the "virtual memory footprint" of every process running. See the man page of "ps" for more information about possible options.
Another common source of problems are java processes, which are generally known to be memory hogs. Find out if there are java processes running ("ps -fe | grep java") and if there are some you have a likely cause for your problem.
Further lets examine the overall memory situation of your machine. Please post the output of the following commands:
"svmon -G" (only as root)
"vmstat -v"
"lsps -a"
Also examine the crontabs of all users on the machine. Maybe some memory hog is started regularly and this is whats causing your problems.
I hope this helps.
bakunin
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message
No utpmx entry: you must exec "login" from lowest level "shell" :confused:
What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies
2. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
3. Linux
Hello friends,
Assume that, I am trying to execute a "db2 connect" command from Linux shell prompt via a shell script called "sample"
sample
db2 connect to bas39
$sample
If the database is not present its should display a custom error message by catching the error message given by db2.... (1 Reply)
Discussion started by: frozensmilz
1 Replies
4. Shell Programming and Scripting
hi All,
cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'
Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. Shell Programming and Scripting
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
7. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
8. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
9. AIX
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT REDHAT
tcl_mem_debug
TCL_MEM_DEBUG(3) Tcl Library Procedures TCL_MEM_DEBUG(3)
__________________________________________________________________________________________________________________________________________________
NAME
TCL_MEM_DEBUG - Compile-time flag to enable Tcl memory debugging.
DESCRIPTION
When Tcl is compiled with TCL_MEM_DEBUG defined, a powerful set of memory debugging aids are included in the compiled binary. This
includes C and Tcl functions which can aid with debugging memory leaks, memory allocation overruns, and other memory related errors.
ENABLING MEMORY DEBUGGING
To enable memory debugging, Tcl should be recompiled from scratch with TCL_MEM_DEBUG defined. This will also compile in a non-stub version
of Tcl_InitMemory to add the memory command to Tcl.
TCL_MEM_DEBUG must be either left defined for all modules or undefined for all modules that are going to be linked together. If they are
not, link errors will occur, with either TclDbCkfree and Tcl_DbCkalloc or Tcl_Ckalloc and Tcl_Ckfree being undefined.
Once memory debugging support has been compiled into Tcl, the C functions Tcl_ValidateAllMemory, and Tcl_DumpActiveMemory, and the Tcl mem-
ory command can be used to validate and examine memory usage.
GUARD ZONES
When memory debugging is enabled, whenever a call to ckalloc is made, slightly more memory than requested is allocated so the memory debug-
ging code can keep track of the allocated memory, and eight-byte ``guard zones'' are placed in front of and behind the space that will be
returned to the caller. (The sizes of the guard zones are defined by the C #define LOW_GUARD_SIZE and #define HIGH_GUARD_SIZE in the file
generic/tclCkalloc.c -- it can be extended if you suspect large overwrite problems, at some cost in performance.) A known pattern is writ-
ten into the guard zones and, on a call to ckfree, the guard zones of the space being freed are checked to see if either zone has been mod-
ified in any way. If one has been, the guard bytes and their new contents are identified, and a ``low guard failed'' or ``high guard
failed'' message is issued. The ``guard failed'' message includes the address of the memory packet and the file name and line number of
the code that called ckfree. This allows you to detect the common sorts of one-off problems, where not enough space was allocated to con-
tain the data written, for example.
DEBUGGING DIFFICULT MEMORY CORRUPTION PROBLEMS
Normally, Tcl compiled with memory debugging enabled will make it easy to isolate a corruption problem. Turning on memory validation with
the memory command can help isolate difficult problems. If you suspect (or know) that corruption is occurring before the Tcl interpreter
comes up far enough for you to issue commands, you can set MEM_VALIDATE define, recompile tclCkalloc.c and rebuild Tcl. This will enable
memory validation from the first call to ckalloc, again, at a large performance impact.
If you are desperate and validating memory on every call to ckalloc and ckfree isn't enough, you can explicitly call Tcl_ValidateAllMemory
directly at any point. It takes a char * and an int which are normally the filename and line number of the caller, but they can actually
be anything you want. Remember to remove the calls after you find the problem.
SEE ALSO
memory, Tcl_ValidateAllMemory, Tcl_DumpActiveMemory
KEYWORDS
memory, debug
Tcl 8.1 TCL_MEM_DEBUG(3)