Sponsored Content
Operating Systems Solaris Can I gzip or delete pacct files in solaris ? Post 302119887 by ghostdog74 on Friday 1st of June 2007 11:08:27 AM
Old 06-01-2007
you can look for the turnacct command. think its like this
Code:
/usr/lib/acct/turnacct switch; /bin/rm -f /var/adm/pacct?

fine tune it according to your environment, then put in the cron.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

gzip, multiple files

Hello Everyone, Here is what I am trying to do. I have four text files, I want to gzip them under unix and mail the zipped file via outlook. I am able to do this easily enough, but using winzip or pkunzip to unzip the file, there is only one file. (In essence, all four files were... (2 Replies)
Discussion started by: smbodnar
2 Replies

2. UNIX for Dummies Questions & Answers

gzip all the files in a directory

Hi, There are multiple files in a directory with different names.How can they be gzipped such that the timestamp of the files is not changed. (2 Replies)
Discussion started by: er_ashu
2 Replies

3. Shell Programming and Scripting

unzip particular gzip files among the normal data files

Hello experts, I run Solaris 9. I have a below script which is used for gunzip the thousand files from a directory. ---- #!/usr/bin/sh cd /home/thousands/gzipfiles/ for i in `ls -1` do gunzip -c $i > /path/to/file/$i done ---- In my SAME directory there thousand of GZIP file and also... (4 Replies)
Discussion started by: thepurple
4 Replies

4. Shell Programming and Scripting

gzip the files with particular extension

Is there any way to compress only the files with .xml extension within a folder which in turn has many sub folders? gzip -r9 path/name/*.xml is not working This compression is done in the Windows server using Batch script. (2 Replies)
Discussion started by: Codesearcher
2 Replies

5. Programming

Uncompress a gzip and bzip file using java on unix solaris environment

Hi, I need to uncompress a gzip and bzip file using java on unix solaris environment. I also need to retreive the header information of the file inorder to differentiate between gzip and bzip file. Please help Pooja (0 Replies)
Discussion started by: wadhwa.pooja
0 Replies

6. Shell Programming and Scripting

how to delete 3 days old files using ftp in a shell script (Solaris OS)

I need help in writng a script to delete last three days files from a remote server using only FTP / SFTP. I was using find command which is not working and i cant use ssh Immediate response is highly appreciated . Thank in advance! ---------- Post updated 12-05-10 at 09:16 PM ----------... (5 Replies)
Discussion started by: Olivia
5 Replies

7. UNIX for Advanced & Expert Users

gzip vs pipe gzip: produce different file size

Hi All, I have a random test file: test.txt, size: 146 $ ll test.txt $ 146 test.txt Take 1: $ cat test.txt | gzip > test.txt.gz $ ll test.txt.gz $ 124 test.txt.gz Take 2: $ gzip test.txt $ ll test.txt.gz $ 133 test.txt.gz As you can see, gzipping a file and piping into gzip... (1 Reply)
Discussion started by: hanfresco
1 Replies

8. Solaris

Solaris, delete install files

Hi I would like to know if and what installation files can be deleted on a sun solaris server. From the listing below there are several files that I would like to delete in order to get some free space on the disk. Is it safe to delete zip, gz and Z files files located in silent_install or will... (2 Replies)
Discussion started by: lmdcmn
2 Replies

9. Shell Programming and Scripting

tar and gzip files

Hi Guys, I am using RHEL5 and Solaris 9 & 10. I want to tar and gzip my files then remove them after a successful tar command... Lets say I have files with extension .arc then I want to tar and gzip these files. After successful tar command I want to remove all these files (i.e .arc). ... (3 Replies)
Discussion started by: Phuti
3 Replies

10. Debian

Some commands not logged in pacct

Hi, Examining the Debian Linux logfiles, I found out that not all commands are logged in my pacct (/var/log/account/pacct) For instance, if I run and stop Wireshark and do after that # lastcomm | grep "wireshark" The wireshark command is logged as expected. # lastcomm | grep... (1 Reply)
Discussion started by: suvios
1 Replies
acctsh(1M)						  System Administration Commands						acctsh(1M)

NAME
acctsh, chargefee, ckpacct, dodisk, lastlogin, monacct, nulladm, prctmp, prdaily, prtacct, shutacct, startup, turnacct - shell procedures for accounting SYNOPSIS
/usr/lib/acct/chargefee login-name number /usr/lib/acct/ckpacct [blocks] /usr/lib/acct/dodisk [-o] [filename...] /usr/lib/acct/lastlogin /usr/lib/acct/monacct number /usr/lib/acct/nulladm filename... /usr/lib/acct/prctmp filename /usr/lib/acct/prdaily [-c] [-l] [mmdd] /usr/lib/acct/prtacct filename [ '' heading ''] /usr/lib/acct/shutacct [ '' reason ''] /usr/lib/acct/startup /usr/lib/acct/turnacct on | off | switch DESCRIPTION
chargefee Command chargefee can be invoked to charge a number of units to login-name. A record is written to /var/adm/fee, to be merged with other accounting records by runacct(1M). ckpacct Command ckpacct should be initiated using cron(1M) to periodically check the size of /var/adm/pacct. If the size exceeds blocks, 500 by default, turnacct will be invoked with argument switch. To avoid a conflict with turnacct switch execution in runacct, do not run ckpacct and runacct simultaneously. If the number of free disk blocks in the /var file system falls below 500, ckpacct will automatically turn off the collection of process accounting records via the off argument to turnacct. When at least 500 blocks are restored, the accounting will be activated again on the next invocation of ckpacct. This feature is sensitive to the frequency at which ckpacct is executed, usually by the cron(1M) command. dodisk Command dodisk should be invoked by cron(1M) to perform the disk accounting functions. lastlogin Command lastlogin is invoked by runacct(1M) to update /var/adm/acct/sum/loginlog, which shows the last date on which each person logged in. monacct Command monacct should be invoked once each month or each accounting period. number indicates which month or period it is. If number is not given, it defaults to the current month (01-12). This default is useful if monacct is to executed using cron(1M) on the first day of each month. monacct creates summary files in /var/adm/acct/fiscal and restarts the summary files in /var/adm/acct/sum. nulladm Command nulladm creates filename with mode 664 and ensures that owner and group are adm. It is called by various accounting shell procedures. prctmp Command prctmp can be used to print the session record file (normally /var/adm/acct/nite/ctmp created by acctcon1 (see acctcon(1M)). prdaily Command prdaily is invoked by runacct(1M) to format a report of the previous day's accounting data. The report resides in /var/adm/acct/sum/rprt/mmdd where mmdd is the month and day of the report. The current daily accounting reports may be printed by typing prdaily. Previous days' accounting reports can be printed by using the mmdd option and specifying the exact report date desired. prtacct Command prtacct can be used to format and print any total accounting (tacct)file. shutacct Command shutacct is invoked during a system shutdown to turn process accounting off and append a reason record to /var/adm/wtmpx. startup Command startup can be invoked when the system is brought to a multi-user state to turn process accounting on. turnacct Command turnacct is an interface to accton (see acct(1M)) to turn process accounting on or off. The switch argument moves the current /var/adm/pacct to the next free name in /var/adm/pacct.incr (where incr is a number starting with 0 and incrementing by one for each addi- tional pacct file), then turns accounting back on again. This procedure is called by ckpacct and thus can be taken care of by the cron(1M) command and used to keep pacct to a reasonable size. shutacct uses turnacct to stop process accounting. startup uses turnacct to start process accounting. OPTIONS
The following options are supported: -c This option prints a report of exceptional resource usage by command, and may be used on current day's accounting data only. -l This option prints a report of exceptional usage by login id for the specified date. Previous daily reports are cleaned up and therefore inaccessible after each invocation of monacct. -o This option uses acctdusg (see acct(1M)) to do a slower version of disk accounting by login directory. filenames specifies the one or more filesystem names where disk accounting will be done. If filenames are used, disk accounting will be done on these filesystems only. If the -o option is used, filenames should be mount points of mounted filesystems. If the -o option is omitted, filenames should be the special file names of mountable filesystems. FILES
/etc/logadm.conf Configuration file for the logadm(1M) command /usr/lib/acct Holds all accounting commands listed in section 1M of this manual /usr/lib/acct/ptecms.awk Contains the limits for exceptional usage by command name /usr/lib/acct/ptelus.awk Contains the limits for exceptional usage by login ID /var/adm/acct/fiscal Fiscal reports directory /var/adm/acct/nite Working directory /var/adm/acct/sum Summary directory that contains information for monacct /var/adm/acct/sum/loginlog File updated by last login /var/adm/fee Accumulator for fees /var/adm/pacct Current file for per-process accounting /var/adm/pacctincr Used if pacct gets large and during execution of daily accounting procedure /var/adm/wtmpx History of user access and administration information ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWaccu | +-----------------------------+-----------------------------+ SEE ALSO
acctcom(1), acct(1M), acctcms(1M), acctcon(1M), acctmerg(1M), acctprc(1M), cron(1M), fwtmp(1M), logadm(1M), runacct(1M), acct(2), acct.h(3HEAD), utmpx(4), attributes(5) NOTES
See runacct(1M) for the main daily accounting shell script, which performs the accumulation of connect, process, fee, and disk accounting on a daily basis. It also creates summaries of command usage. SunOS 5.10 15 Mar 2002 acctsh(1M)
All times are GMT -4. The time now is 11:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy