2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00
xcat-core/xCAT-client/pods/man8/tabprune.8.pod
2016-02-08 13:40:51 -05:00

107 lines
2.2 KiB
Plaintext

=head1 NAME
B<tabprune> - Deletes records from the eventlog,auditlog,isnm_perf,isnm_perf_sum tables.
=head1 SYNOPSIS
B<tabprune> [B<eventlog | auditlog>] [B<-V>] [B<-i> I<recid> |B<-n> I<number of records> | B<-p> I<percentage> | B<-d> I<number of days> | B<-a>]
B<tabprune> I<tablename> B<-a>
B<tabprune> [B<-h>|B<--help>] [B<-v>|B<--version>]
=head1 DESCRIPTION
The tabprune command is used to delete records from the auditlog, eventlog, isnm_perf, isnm_perf_sum tables. As an option, the table header and all the rows pruned from the specified table will be displayed in CSV (comma separated values) format. The all records options (-a) can be used on any xCAT table.
=head1 OPTIONS
=over 10
=item B<-h|--help>
Display usage message.
=item B<-V>
Verbose mode. This will cause tabprune to display the records that are being deleted from the table, in case
you want to redirect them to a file to archive them.
=item B<-a>
Remove all records from the input table name. This option can be used on any xCAT table.
=item B<-i> I<recid number>
Remove the records whose recid is less than the input recid number.
=item B<-n> I<number>
Remove the number of records input.
=item B<-p> I<percent>
Remove the number of records input.
=item B<-d> I<number of days>
Remove all records that occurred >= than number of days ago.
=back
=head1 RETURN VALUE
=over 3
=item 0.
The command completed successfully.
=item 1.
An error has occurred.
=back
=head1 EXAMPLES
=over 2
=item 1.
To remove all the records in the eventlog table:
tabprune eventlog -a
=item 2.
To remove all the records in the eventlog table saving the deleted records in eventlog.csv:
tabprune eventlog -V -a > eventlog.csv
=item 3.
To remove all the records before recid=200 in the auditlog table:
tabprune auditlog -i 200
=item 4.
To remove 400 records from the auditlog table and display the remove records:
tabprune auditlog -V -n 400
=item 5.
To remove 50% of the eventlog table:
tabprune eventlog -p 50
=item 6.
To remove all records that occurred >= 5 days ago in the eventlog:
tabprune eventlog -d 5
=back
=head1 FILES
/opt/xcat/sbin/tabprune
=head1 SEE ALSO
L<tabrestore(8)|tabrestore.8>, L<tabedit(8)|tabedit.8>,L<tabdump(8)|tabdump.8>