Sponsored Content
Full Discussion: Increase Performance
Top Forums Shell Programming and Scripting Increase Performance Post 302077447 by sandeep_hi on Thursday 22nd of June 2006 08:27:08 AM
Old 06-22-2006
Increase Performance: AWK

I have written a code using AWK & sed to compare two files.
The structure of the files is like this"

Format is this:
<bit code> <file code> <string>
Follwoed by any numbers of properties lines whic start with a "space"

10101010101111101 XX abcd a
AS sasa
BS kkk
1110000101010110 XX abde s
BS jsa
0110000101010100 XX acde sa
1010000101010110 XX adfe ma
AS asas
BS sasa
CS asa

.............................................
.....................................

Containing millions of records like this
Note
1. A new record starts wherever a new line is starting with 1/0
2. Anyline starting with space is properties associated with the last
1/0 record
3. The number of records depicted in above file is 4

I am taking one string at a time (abcd a) and start looking for it in other file, in the string column for 2nd file, until i find that. If that string is found then we compare bit code, file code and properties for that string.
(Although both files are sorted yet some records in either of file may be missing so i can't do line by line comparison)

The behaviour of program is fine but it's taking a lot of time as it is searching through a big file.
So please help me in suggesting how to enhance this file comparison

Thanks
Sandeep

Last edited by sandeep_hi; 06-23-2006 at 12:51 AM..
 

9 More Discussions You Might Find Interesting

1. HP-UX

increase size

Hi All, one of the mount point in Hp ux server has reached 95% its a data base file and can not be deleted. so i want to know how to increase the size of mount point i am new to unix ,please help me (1 Reply)
Discussion started by: jyoti
1 Replies

2. Solaris

how to increase fs

hi, i installed solaris 9 on my v240 server on 36gb disk. here are the ouputs of the df -h command: # df -h Filesystem size used avail capacity Mounted on /dev/dsk/c1t0d0s0 9.6G 3.4G 6.1G 36% / /proc 0K 0K 0K 0% /proc mnttab ... (6 Replies)
Discussion started by: xuc_xich_duc
6 Replies

3. HP-UX

increase fs /var

Question I am not a hp admin but aix admin. I am wondering if to increase the fs /var we really have to umount the fs so means stop the system ... just to do an extendlv ? It is what I saw on man page of extendlv and that surprise me. On aix we can dynamically increase a fs and with version... (2 Replies)
Discussion started by: touny
2 Replies

4. News, Links, Events and Announcements

Announcing collectl - new performance linux performance monitor

About 4 years ago I wrote this tool inspired by Rob Urban's collect tool for DEC's Tru64 Unix. What makes this tool as different as collect was in its day is its ability to run at a low overhead and collect tons of stuff. I've expanded the general concept and even include data not available in... (0 Replies)
Discussion started by: MarkSeger
0 Replies

5. AIX

How can I increase a PV?

Hi, I have a 10GB iSCSI LUN attached to an AIX 5.3 system. I increased the LUN to 15GB, but the system is still showing 10GB as the Total Size. How can I get the OS to see the extra space? Do I have to reboot the system? (2 Replies)
Discussion started by: bbbngowc
2 Replies

6. Shell Programming and Scripting

Increase sed performance

I'm using sed to do find and replace. But since the file is huge and i have more than 1000 files to be searched, the script is taking a lot of time. Can somebody help me with a better sed command. Below is the details. Input: 1 1 2 3 3 4 5 5 Here I know the file is sorted. ... (4 Replies)
Discussion started by: gpaulose
4 Replies

7. UNIX for Dummies Questions & Answers

Increase size to sd[b-c]

hi guys I am working on my vmware workstation. I have a /dev/sdb which is 5GB. I am using LVM. Now I increase /dev/sdb 2 more GB. fdisk -l shows 7 GB but pvscan still shows 5GB. how do I make my system recognize the new 7GB added and be able to add those to my physical volumen and... (1 Reply)
Discussion started by: kopper
1 Replies

8. Red Hat

Increase maxuproc value

Hi Guys, I am running RHEL6 and now my processes reach maximum limit. How do I increase the maxuproc value? Can I increase the value without rebooting the server? Thanks in advance... Please Help!!! (5 Replies)
Discussion started by: Phuti
5 Replies

9. Shell Programming and Scripting

Increase the performance of find command.

I'm trying to exclude 'BACKUP', 'STORE', 'LOGGER' folders while searching for all files under a directory "/tmp/moht" Once a file is found I wish to display the filename, the size of the file & the cksum value. Below is the command, I'm using: /opt/freeware/bin/find /tmp/moht -type d -name... (6 Replies)
Discussion started by: mohtashims
6 Replies
HWDB(7) 							       hwdb								   HWDB(7)

NAME
hwdb - Hardware Database DESCRIPTION
The hardware database is a key-value store for associating modalias-like keys to udev-property-like values. It is used primarily by udev to add the relevant properties to matching devices, but it can also be queried directly. HARDWARE DATABASE FILES
The hwdb files are read from the files located in the system hwdb directory /lib/udev/hwdb.d and the local administration directory /etc/udev/hwdb.d. All hwdb files are collectively sorted and processed in lexical order, regardless of the directories in which they live. However, files with identical filenames replace each other. Files in /etc have the highest priority and take precedence over files with the same name in /lib. This can be used to override a system-supplied hwdb file with a local file if needed; a symlink in /etc with the same name as a hwdb file in /lib, pointing to /dev/null, disables that hwdb file entirely. hwdb files must have the extension .hwdb; other extensions are ignored. Each hwdb file contains data records consisting of matches and associated key-value pairs. Every record in the hwdb starts with one or more match strings, specifying a shell glob to compare the lookup string against. Multiple match lines are specified in consecutive lines. Every match line is compared individually, and they are combined by OR. Every match line must start at the first character of the line. The match lines are followed by one or more key-value pair lines, which are recognized by a leading space character. The key name and value are separated by "=". An empty line signifies the end of a record. Lines beginning with "#" are ignored. In case multiple records match a given lookup string, the key-value pairs from all records are combined. If a key is specified multiple times, the value from the record with the highest priority is used (each key can have only a single value). The priority is higher when the record is in a file that sorts later lexicographically, and in case of records in the same file, later records have higher priority. The content of all hwdb files is read by systemd-hwdb(8) and compiled to a binary database located at /etc/udev/hwdb.bin, or alternatively /lib/udev/hwdb.bin if you want ship the compiled database in an immutable image. During runtime, only the binary database is used. EXAMPLES
Example 1. General syntax of hwdb files # /lib/udev/hwdb.d/example.hwdb # Comments can be placed before any records. This is a good spot # to describe what that file is used for, what kind of properties # it defines, and the ordering convention. # A record with three matches and one property mouse:*:name:*Trackball*: mouse:*:name:*trackball*: mouse:*:name:*TrackBall*: ID_INPUT_TRACKBALL=1 # A record with a single match and five properties mouse:usb:v046dp4041:name:Logitech MX Master: MOUSE_DPI=1000@166 MOUSE_WHEEL_CLICK_ANGLE=15 MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26 MOUSE_WHEEL_CLICK_COUNT=24 MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL=14 Example 2. Overriding of properties # /lib/udev/hwdb.d/60-keyboard.hwdb evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn* KEYBOARD_KEY_a1=help KEYBOARD_KEY_a2=setup KEYBOARD_KEY_a3=battery evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn123* KEYBOARD_KEY_a2=wlan # /etc/udev/hwdb.d/70-keyboard.hwdb # disable wlan key on all at keyboards evdev:atkbd:* KEYBOARD_KEY_a2=reserved If the hwdb consists of those two files, a keyboard with the lookup string "evdev:atkbd:dmi:bvnAcer:bdXXXXX:bd08/05/2010:svnAcer:pn123" will match all three records, and end up with the following properties: KEYBOARD_KEY_a1=help KEYBOARD_KEY_a2=reserved KEYBOARD_KEY_a3=battery SEE ALSO
systemd-hwdb(8) systemd 237 HWDB(7)
All times are GMT -4. The time now is 04:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy