To compress and uncompress the files in unix you can use the following commands.
1. Compress and uncompress
2. gzip and gunzip
3. bzip2 and bunzip2
Compress and uncompress
The output file has the extension as .Z
Example:
$ compress -v test.txt
test.txt: Compression: 59.74% This file is replaced with test.txt.Z
To compress file to another directory
$ compress -c proddmp.dmp > /data_back/proddmp.dmp.Z
$ uncompress test.txt.Z
$
To uncompress to another directory
$ uncompress -c proddmp.dmp.Z > /oradump/proddmp.dmp
gzip and gunzip
The output file has the extension as .gz
Example:
$ gzip test.txt
test.txt.gz
$ gunzip test.txt.gz
note: You can use gzip -d instead of gunzip. Both are same.
To view the compressed text file without decompressing use gzcat or gzmore if available in the platform.
$ gzcat test.txt.gz
$ gzmore test.txt.gz
To compress the folder
$ gzip -r /oracle/test
$ gunzip -r /oracle/test
bzip2 and bunzip2
The output file has the extension .bz2 The usage of bzip2 and bunzip2 is similar to gzip and gunzip.
Thanks
Sunday, September 13, 2009
Tuesday, May 19, 2009
svmon
The svmon command captures a snapshot of virtual memory, so it is useful for determining which processes, user programs, and segments are consuming the most real, virtual, and paging space memory.
To display the total real memory pages that are in use and free and the paging space pages that are in use and free.
# svmon -G
To display the processes using the most real memory
# svmon -Pu -t x |grep -p Pid|grep '^.*[0-9]'
where x is the top x no. of processes.
To display the processes using the most paging space
# svmon -gP -t x |grep -p Pid|grep '^.*[0-9]'
In the O/P the pgsp indicates the number of 4kb pages reserved or used in the paging space by this process. Inuse column indicates the total real memory pages used.
To find out the most utilized segments
# svmon –S –t 10
With the -S option, svmon sorts segments by memory usage and displays the
statistics for the top memory-usage segments.
The different segments are
1. Persistent - Used to manipulate JFS files and directories
2. Working - Used to implement data areas of processes and shared memory.
3. Client - Used to implement some virtual file systems such as CD ROM etc.
4. Mapping - Used to implement the mapping of files in memory.
5. Real memory map – Used to access I/O space from virtual address space.
Thanks
To display the total real memory pages that are in use and free and the paging space pages that are in use and free.
# svmon -G
To display the processes using the most real memory
# svmon -Pu -t x |grep -p Pid|grep '^.*[0-9]'
where x is the top x no. of processes.
To display the processes using the most paging space
# svmon -gP -t x |grep -p Pid|grep '^.*[0-9]'
In the O/P the pgsp indicates the number of 4kb pages reserved or used in the paging space by this process. Inuse column indicates the total real memory pages used.
To find out the most utilized segments
# svmon –S –t 10
With the -S option, svmon sorts segments by memory usage and displays the
statistics for the top memory-usage segments.
The different segments are
1. Persistent - Used to manipulate JFS files and directories
2. Working - Used to implement data areas of processes and shared memory.
3. Client - Used to implement some virtual file systems such as CD ROM etc.
4. Mapping - Used to implement the mapping of files in memory.
5. Real memory map – Used to access I/O space from virtual address space.
Thanks
Labels:
Server Tuning,
SVMON,
Unix
Subscribe to:
Posts (Atom)

