Appendix A
Command Line Utilities
This appendix provides complete details on the available commands, options, values, syntax notation, and usage rules for the Calendar Server command line utilities. It provides supporting reference material for the topics described in Chapter 3, Administering Calendar Server.
Administration for iPlanet Calendar Server is provided by a set of command line utilities. Each utility accepts options from the command line and can be invoked from batch, shell, and scripting programs such as Perl. Where applicable, default values for the available option are taken from the server.conf configuration file.
|
Command Line Utility Syntax |
Calendar Server command line utilities use the following syntax:
utility [-option [value]] command [target]
where:
Usage Rules
The following rules provide general usage guidelines for the command line utilities:
Command Line Utility Summary
Table A.1 summarizes the command line utilities.
|
csbackup |
The csbackup utility lets you backup individual calendars, users, and the calendar database. It provides the following commands:
Syntax
csbackup [-v | -q] database outputdir
csbackup [-v | -q] -c CALID calendar outputfile
csbackup [-v | -q] -a USERID [-b BASEDN] [-h host] [-p port] [-u adminuser] [-w password] defcal outputfile
Requirements:
Examples
csbackup database backupdir
The above example backs up the calendar database to a directory named
backupdir.
csbackup -c calA calendar calA.ics
The above example backs up the calendar with the CALID calA to the file
calA.ics as text/calendar.
csbackup -a userA defcal userA.xml
The above example backs up the default calendar for user userA to the file
userA.xml as text/xml.
Table A.2 describes the commands available for the csbackup utility.
Table A.3 describes the csbackup utility command options.
|
cscal |
The cscal utility lets you manage calendars and their properties. It provides the following commands:
Syntax
cscal [-v | -q] [-c charset] [-d description] [-g categories] [-l langcode]
[-m email] [-n name] [-o owner] [-r public | private]
[-w public | private] [-y otherowners] create | modify CALID
cscal [-v | -q] [-o owner] delete | disable | enable | list | reset [CALID]
Requirements:
Examples
cscal -n exampleA -o userA -r public create calA
The above example creates the calendar with the CALID calA for userA with the visible name exampleA which can be read by anyone.
cscal delete calA
The above example deletes calA (removes it from the calendar database).
cscal -o userA delete
The above example deletes all calendars whose primary owner is userA (removes them from the calendar database).
cscal disable calA
The above example disables the calendar with the CALID calA (users will not be allowed to read, write to, or locate it using the user interface).
cscal enable calA
The above example enables the calendar with the CALID calA (users are allowed to read or write to it using the user interface).
cscal list calA
The above example lists the properties of calA.
cscal -v list calA
The above example lists all the properties of calA.
cscal list
The above example lists all the calendars in the database.
cscal -g sports -y userB -r private -v modify calA
The above example modifies calA so that it is associated with the category sports, is co-owned by userB, and can be read only by the owners.
cscal reset calA
The above example resets the calendar with the CALID calA to the default configuration settings.
cscal -d "" modify calA
The above example removes a description from the calendar with the CALID calA.
cscal -g "" modify calA
The above example removes all categories from the calendar with the CALID calA.
cscal -y "" modify calA
The above example removes other owners from the calendar with the CALID calA.
Table A.4 describes the commands available for the cscal utility.
Table A.5 describes the cscal utility command options.
|
cscomponents |
The cscomponents utility lets you manage components (events and tasks) in a calendar. It provides the following commands:
Syntax
cscomponents [-v | -q] [-e endtime] [-s starttime] [-t event | task] delete | list CALID
Requirements:
Examples
cscomponents -s 19980101T000000Z -e 19981231T000000Z delete calA
The above command deletes all 1998 events in the calendar with the CALID calA.
cscomponents -v list calA
The above command lists all events and tasks, with details, in the calendar with the CALID calA.
Table A.6 describes the commands available for the cscomponent utility.
Table A.7 describes the cscomponent utility command options.
|
csdb |
The csdb utility lets you manage the calendar databases. It provides the following commands:
Note.
For more information on Calendar Server databases, see Database Technology.
Syntax
csdb [-v | -q] [-t cal | sess | stats] list
csdb [-v | -q] [-t cal | sess | stats] [-h host] [-p port] create | delete | recover [dbdir]
Requirements:
Examples
csdb -v create
The above command creates new, un-populated databases in the current directory.
csdb -v delete
The above command deletes the databases in the current directory.
csdb -v list
The above command lists information about the databases in the current directory.
csdb recover
The above command attempts to recover damaged databases in the current directory.
csdb -t sess list
The above command lists information about the sessions database in the current directory.
csdb -t stat recover
The above command attempts to recover a damaged statistics database in the current directory.
Table A.8 describes the commands available for the csdb utility.
Table A.9 describes the csdb utility command options.
|
csexport |
The csexport utility lets you export a calendar to a file in ICAL or XML format. It provides the following commands:
calendar specifies the calendar on which to perform an action
Syntax
csexport [-v | -q] -c CALID calendar outputfile
Requirements:
Examples
csexport -c calA calendar calA.ics
The above command exports the calendar with the CALID calA in ICAL (text/calendar) format to file named calA.ics.
csexport -c calA calendar calA.xml
The above command exports the calendar with the CALID calA in XML (text/xml) format to file named calA.xml.
Table A.10 describes the commands available for the csexport utility.
Table A.11 describes the csexport utility command options.
|
csimport |
The csimport utility lets you import a calendar from a file in ICAL or XML format that was saved with the csexport utility. It provides the following commands:
Syntax
csimport [-v | -q] -c CALID calendar inputputfile
Requirements:
Examples
csimport -c calA calendar calA.ics
The above command imports the calendar with the CALID calA from the file calA.ics and expects ICAL (text/calendar file) format.
csexport -c calA calendar calA.xml
The above command imports the calendar with the CALID calA from the file calA.xml and expects XML (text/calendar file) format.
Table A.12 describes the commands available for the csimport utility.
Table A.13 describes the csimport utility command options.
|
csrestore |
The csrestore utility lets you restore individual calendars, users, and the calendar database. It provides the following commands:
Syntax
csrestore [-v | -q] database inputdir
csrestore [-v | -q] -c CALID calendar inputfile
csrestore [-v | -q] -a USERID [-b BASEDN] [-h host] [-p port] [-u adminuser] [-w password] defcal inputfile
Requirements:
Examples
csrestore database backupdir
The above command restores the calendar database stored in the directory backupdir that was previously saved using the csbackup command line utility.
csrestore -c calA calendar backupdir/calA.ics
The above command restores the calendar with the CALID calA from the file calA.ics located in the directory backupdir that was previously saved in ICAL (text/calendar file) format using the csbackup or csexport utility.
csrestore -c calA calendar backupdir
The above command restores calA from the calendar database in backupdir that was previously saved using csbackup.
csrestore -a userA defcal backupdir/userA.ics
The above command restores the default calendar owned by userA from the file userA.ics located in the directory backupdir that was previously saved in ICAL (text/calendar file) format using the csbackup or csexport utility.
Table A.14 describes the commands available for the csrestore utility.
Table A.15 describes the csrestore utility command options.
|
cssession |
The cssession command line utility lets you manage sessions in a Calendar Server. It provides the following commands:
Syntax
cssession [-v | -q] [-h host] [-a port] [-s sessionid | -t tcpaddress] [-u calmaster] [-w password] list | logout [USERID]
Requirements:
Examples
cssession -p 81 -u calmaster -v -w calmasterpwd list userA
The above command lists the status for userA using the calmaster as the USERID of the administrator accessing the Calendar Server admin port at port number 81.
cssession -p 81 -u calmaster -w calmasterpwd list
The above command lists all logged-in users using the calmaster as the USERID of the administrator accessing the Calendar Server admin port at port number 81.
cssession -p 81 -u calmaster -w calmasterpwd logout userA
The above command will logout userA using the calmaster as the USERID of the administrator accessing the Calendar Server admin port at port number 81.
Table A.16 describes the commands available for the cssession utility.
Table A.17 describes the cssession utility command options.
|
csstart |
The csstart utility lets you start the Calendar Server. It provides the following command:
Syntax
csstart [-q | -v] [-a port] [-p port] [-g groupid] [-l listenaddr] [-u USERID] service [servicename]
Requirements:
Examples
csstart service
The above command starts all Calendar Server services using the default ports.
csstart -p 80 -a 81 service http
The above command starts the HTTP service listening on port 80 and the administration port listening on port 81.
Table A.18 describes the commands available for the csstart utility.
Table A.19 describes the csstart utility command options.
|
csstats |
The csstats utility lets you display the statistics of a Calendar Server and provides the following commands:
Note.
For more information on counters, see Counters.
Syntax
csstats [-q | v] [-r registry] [-i iterations] [-s delay]] list [subsystem]
Requirements:
Examples
csstats list
The above command displays basic information about counters and what types are available.
csstats list http
The above command lists counter statistics about the HTTP service subsystem (hpptstat).
csstats -i 3600 -s 10 list wcap
The above command lists counter statistics about the wcap subsystem (wcapstat) every 10 seconds for one hour (3600 seconds).
Table A.20 describes the commands available for the csstats utility.
Table A.21 describes the csstats utility command options.
|
csstop |
The csstop utility lets you stop the Calendar Server. It provides the following commands:
Syntax
csstop [-v | -q] [-a port] [-r] [-u calmaster] [-w password] service [servicename]
Requirements:
Examples
csstop service
The above command stops all local Calendar Server services.
csstop service http
The above command stops a local Calendar Server http service.
Table A.22 describes the commands available for the csstop utility.
Table A.23 describes the csstop utility command options.
|
cstool |
The cstool utility lets you ping a Calendar Server or force the Calendar Server to refresh its configuration. It provides the following commands:
Syntax
cstool [-q | -v] [-p port] [-t timeout] ping [hostname]
cstool [-q | -v] [-p port] [-r] [-t timeout] [-u calmaster] [-w password] refresh [hostname]
Requirements:
Examples
cstool -p 80 ping calserver
The above command pings the machine with the host name calserver to see if a Calendar Server is listening on port 80.
cstool refresh
The above command forces a local Calendar Server to refresh its configuration.
Table A.24 describes the commands available for the cstool utility.
Table A.25 describes the cstool utility command options.
|
csuser |
The csuser utility lets you manage calendar user information stored in an LDAP directory server. It provides the following commands:
Syntax
csuser [-v | -q] [-b BASEDN] [-c CALID] -g givenname [-h host] [-p port]
-s surname [-u ldapadmin] [-w password] -y userpassword create USERID
csuser [-v | -q] [-b BASEDN] [-h host] [-p port] [-u adminuser] [-w password]
check | delete | disable | enable | list | reset [USERID]
Requirements:
Examples
csuser check JSmith
The above example checks if the calendar user JSmith is enabled for calendaring (if the existing calendar user has access to calendar data on this Calendar Server).
csuser -g John -s Smith -y password -c JSmithcal create JSmith
The above example creates an LDAP user with the USERID JSmith with the givenname John, surname Smith, and the CALID JSmithcal.
csuser delete JSmith
The above example deletes the user JSmith.
csuser disable JSmith
The above example disables the calendar user JSmith from logging in to the Calendar Server.
Note.
The command in this example prevents JSmith from being able to log in to the Calendar Server to access calendar data, but JSmith's data is not deleted from the local calendar database. If JSmith is currently logged in to the Calendar Server, JSmith retains access to calendar data until he logs off or is logged off by the administrator. (The cssession utility's logout command lets an administrator log off a user. For more information see, cssession.)
csuser enable JSmith
The above example enables JSmith for calendaring (lets existing calendar user JSmith log on to the Calendar Server).
csuser -v list JSmith
The above example lists all calendar attributes for JSmith.
csuser reset JSmith
The above example resets all calendar attributes for JSmith to the default configuration settings.
Table A.26 describes the commands available for the csuser utility.
Table A.27 describes the csuser utility command options.
|
|
|