01-06-2012
yeh ..all the files get overwritten all day and then we have to come back to the previous state.
starting 25 process didnt help as it was loading the i/o
we found 5 process optimum.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all you enlightened unix people,
I've been trying to execute a perl script that contains the following line within backticks:
`grep -f patternfile.txt otherfile.txt`;It takes normally 2 minutes to execute this command from the bash shell by hand.
I noticed that when i run this command... (2 Replies)
Discussion started by: silverlocket
2 Replies
2. Shell Programming and Scripting
I am trying to copy a folder which contains a list of C executables.
It takes 2 mins for completion,where as the entire script takes only 3 more minutes for other process.
Is there a way to copy the folder faster so that the performance of the script will improve? (2 Replies)
Discussion started by: prasperl
2 Replies
3. UNIX for Dummies Questions & Answers
i)wc -c/etc/passwd|awk'{print $1}'
ii)ls -al/etc/passwd|awk'{print $5}' (4 Replies)
Discussion started by: karthi_g
4 Replies
4. Shell Programming and Scripting
Hi,
A datafile containing lines such as below needs to be split:
500000000000932491683600000000000000000000000000016800000GS0000000000932491683600*HOME
I need to get the 2-5, 11-20, and 35-40 characters and I can do it via cut command.
cut -c 2-5 file > temp1.txt
cut -c 11-20 file >... (9 Replies)
Discussion started by: daytripper1021
9 Replies
5. Shell Programming and Scripting
I'm sorting files from a source directory by size into 4 categories then copying them into 4 corresponding folders, just wondering if there's a faster/better/more_elegant way to do this:
find /home/user/sourcefiles -type f -size -400000k -exec /bin/cp -uv {} /home/user/medfiles/ \;
find... (0 Replies)
Discussion started by: unclecameron
0 Replies
6. Shell Programming and Scripting
Hi,
I have a script below for extracting xml from a file.
for i in *.txt
do
echo $i
awk '/<.*/ , /.*<\/.*>/' "$i" | tr -d '\n'
echo -ne '\n'
done
.
I read about using multi threading to speed up the script.
I do not know much about it but read it on this forum.
Is it a... (21 Replies)
Discussion started by: chetan.c
21 Replies
7. Shell Programming and Scripting
awk "/May 23, 2012 /,0" /var/tmp/datafile
the above command pulls out information in the datafile. the information it pulls is from the date specified to the end of the file.
now, how can i make this faster if the datafile is huge? even if it wasn't huge, i feel there's a better/faster way to... (8 Replies)
Discussion started by: SkySmart
8 Replies
8. UNIX for Dummies Questions & Answers
Hello guys,
I'm cleaning out big XML files (we're talking about 1GB at least), most of them contain words written in a non-latin alphabet.
The command I'm using is so slow it's not even funny:
cat $1 | sed -e :a -e 's/<*>//g;/</N;//ba;s/</ /g;s/>/... (4 Replies)
Discussion started by: bobylapointe
4 Replies
9. Shell Programming and Scripting
Hi,
I have a large number of input files with two columns of numbers.
For example:
83 1453
99 3255
99 8482
99 7372
83 175
I only wish to retain lines where the numbers fullfil two requirements. E.g:
=83
1000<=<=2000
To do this I use the following... (10 Replies)
Discussion started by: s052866
10 Replies
10. Shell Programming and Scripting
I have the below command which is referring a large file and it is taking 3 hours to run. Can something be done to make this command faster.
awk -F ',' '{OFS=","}{ if ($13 == "9999") print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12 }' ${NLAP_TEMP}/hist1.out|sort -T ${NLAP_TEMP} |uniq>... (13 Replies)
Discussion started by: Peu Mukherjee
13 Replies
LEARN ABOUT FREEBSD
ksyms
KSYMS(4) BSD Kernel Interfaces Manual KSYMS(4)
NAME
ksyms -- kernel symbol table interface
SYNOPSIS
device ksyms
DESCRIPTION
The /dev/ksyms character device provides a read-only interface to a snapshot of the kernel symbol table. The in-kernel symbol manager is
designed to be able to handle many types of symbols tables, however, only elf(5) symbol tables are supported by this device. The ELF format
image contains two sections: a symbol table and a corresponding string table.
Symbol Table
The SYMTAB section contains the symbol table entries present in the current running kernel, including the symbol table entries
of any loaded modules. The symbols are ordered by the kernel module load time starting with kernel file symbols first, followed
by the first loaded module's symbols and so on.
String Table
The STRTAB section contains the symbol name strings from the kernel and any loaded modules that the symbol table entries refer-
ence.
Elf formatted symbol table data read from the /dev/ksyms file represents the state of the kernel at the time when the device is opened.
Since /dev/ksyms has no text or data, most of the fields are initialized to NULL. The ksyms driver does not block the loading or unloading
of modules into the kernel while the /dev/ksyms file is open but may contain stale data.
IOCTLS
The ioctl(2) command codes below are defined in <sys/ksyms.h>.
The (third) argument to the ioctl(2) should be a pointer to the type indicated.
KIOCGSIZE (size_t)
Returns the total size of the current symbol table. This can be used when allocating a buffer to make a copy of the kernel
symbol table.
KIOCGADDR (void *)
Returns the address of the kernel symbol table mapped in the process memory.
FILES
/dev/ksyms
ERRORS
An open(2) of /dev/ksyms will fail if:
[EBUSY] The device is already open. A process must close /dev/ksyms before it can be opened again.
[ENOMEM] There is a resource shortage in the kernel.
[ENXIO] The driver was unsuccessful in creating a snapshot of the kernel symbol table. This may occur if the kernel was in the
process of loading or unloading a module.
SEE ALSO
ioctl(2), nlist(3), elf(5), kldload(8)
HISTORY
A ksyms device exists in many different operating systems. This implementation is similar in function to the Solaris and NetBSD ksyms
driver.
The ksyms driver first appeared in FreeBSD 8.0 to support lockstat(1).
AUTHORS
The ksyms driver was written by Stacey Son <sson@FreeBSD.org>.
BUGS
Because files can be dynamically linked into the kernel at any time the symbol information can vary. When you open the /dev/ksyms file, you
have access to an ELF image which represents a snapshot of the state of the kernel symbol information at that instant in time. Keeping the
device open does not block the loading or unloading of kernel modules. To get a new snapshot you must close and re-open the device.
A process is only allowed to open the /dev/ksyms file once at a time. The process must close the /dev/ksyms before it is allowed to open it
again.
The ksyms driver uses the calling process' memory address space to store the snapshot. ioctl(2) can be used to get the memory address where
the symbol table is stored to save kernel memory. mmap(2) may also be used but it will map it to another address.
BSD
April 5, 2009 BSD