IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> CISAM Utilities - Defrag & Rec Count
Rob Donovan
post 17 Jul 2004, 00:34
Post #1


rob@proivrc.com
Group Icon

Group: Admin
Posts: 1,678
Joined: 31-January 00
From: UK
Member No.: 1



Click here to download the Defrag.cpp code.

compile with...

cxx Defrag.cpp -L/usr/cisam/lib -lisam -o defrag

Where /usr/cisam/lib is where you have installed you cisam kernel

Also another usefull util I wrote was cisamrecs. It gets the number of records and file info directly from the CISAM header. It does not count them, so its instant.

Click here to download the cisamrecs.c code.

compile with...

cc cisamrecs.c -L/usr/cisam/lib -lisam -o cisamrecs

Syntax:

defrag [-compress] [-decompress] [-copy] [-tmp ] [-nolock] 'filename'

-compress - sets compress flag
-decompress - unsets compress flag
-copy - once defrag has copied all recs to the temp file temp_fil dont rename it back to the original filename
-tmp - specify temp file name
-nolock - do not try to lock the file exclusivly. Be carefull with this option!!

This command must ONLY be used on files that are not being accessed. It will set an 'EXCLUSIVE' lock on the file.

Once a CISAM file has been 'compressed' PROIV with continue to add to the file in 'compressed' mode.

cisamrecs 'filename'

The command can be run on 'live' files.

For use with multiple files with both defrag & cisamrecs always specify the '.dat' file.

EG

defrag *.dat
cisamrecs *.dat



**********
DISCLAIMER
**********
While I use this on a regular basis on our production system and have made sure there is nothing wrong with the code, If anything 'bad' happens I cant be held responsible!!

Both programs have been tested and run under DEC / ALPHA / TRU64 UNIX. If used on other systems please check first.

Rob D
Go to the top of the page
 
+Quote Post
virus
post 24 May 2008, 07:53
Post #2


Newbie
*

Group: Members
Posts: 1
Joined: 24-May 08
Member No.: 2,032



link broke.. so ultra ~~
email me pls after: sohboonyong@hotmail.com
i wrote a defragment too but waste time... can i differ urs?
Go to the top of the page
 
+Quote Post
apolanco19
post 25 Jan 2010, 20:36
Post #3


Newbie
*

Group: Members
Posts: 2
Joined: 11-December 07
Member No.: 1,967



Hello

Link is broken for Cisam utilities. Can you send them to my email: apolanco19@gmail.com?

Thanks
Go to the top of the page
 
+Quote Post

Fast ReplyReply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 8th September 2010 - 04:24