Use the staresmonadm
utility to configure the resource monitor (Resmon).
The Services Daemon must be running to use staresmonadm
.
The Oracle user path must be correctly configured.
The staresmonadm
utility uses the parameters listed in the table below. To enable, you must specify all required parameters. You can submit as many parameters as you want in each staresmonadm
command line. The utility only updates the parameters you specify. The unspecified parameters remain at their current value.
Some settings (denoted by * in the table) require you to stop and restart the Services Daemon if you want the setting to take effect immediately. Otherwise these changes take effect as soon as the backup service wakes from its current sleep interval. See Services Daemon - Stop, Restart, or Show Status.
A value of "-1" indicates the parameter is not configured.
Table 4-2 staresmonadm Parameters
Name | Parameter | Description | Default Value |
---|---|---|---|
Query |
|
Display the current Resmon settings. |
None |
Clear |
|
Clear all Resmon settings and disable the service. |
None |
Verbose |
- |
Enables verbose mode, which displays detailed progress information for the command. |
None |
Help |
|
Displays complete syntax information for the command. |
None |
Daily report time (required) |
|
Time of day Resmon sends the Resource Report. Format is The report is sent automatically every 24 hours at approximately this time. The actual time is immediately after the first server scan performed after this time. |
00:00 |
Scan Interval* (required) |
|
Time in seconds Resmon waits between scans. Valid entries: integers greater than 0. |
300 |
Alert nagging* |
|
Indicates whether Resmon sends alerts if it finds that any high-water marks have been reached. Valid entries: When enabled, Resmon sends alert reports whenever it performs a periodic scan and detects a resource has exceeded its high-water mark (as opposed to just sending during the daily report). |
off |
Database username* (required) |
|
Database username that the Resmon service uses to perform queries against the This must be a user with full access to the STA database, either the STA database root user or the STA database administrator. |
blank |
Database password* (required) |
|
Password assigned to the database username. |
blank |
Database tablespace HWM* (required) |
|
High-water mark for the database tablespace, entered as a percentage of the total allocated. Valid entries: integers 0–100 Oracle recommends that usage never exceeds 80 percent. |
-1 |
Local backup HWM* (required) |
|
High-water mark for the STA database local backups volume (for example, Oracle recommends that usage never exceeds 80 percent. |
-1 |
Database disk volume HWM* (required) |
|
High-water mark for the STA database volume (for example, Oracle recommends that usage never exceeds 80 percent. |
|
Logging disk volume HWM* (required) |
|
High-water mark for the STA database logs volume (default is Oracle recommends that usage never exceeds 80 percent. |
|
Root volume HWM* (required) |
|
High-water mark for the root volume ( Oracle recommends that usage never exceeds 80 percent. |
|
Tmp volume HWM* (required) |
|
High-water mark for the temporary directory volume (default is Oracle recommends that usage never exceeds 80 percent. |
|
Physical memory (RAM) HWM* |
|
High-water mark for the total system memory (except virtual memory), entered as a percentage of the total allocated. Valid entries: integers 0 –100 Oracle recommends that usage never exceeds 80 percent. |
|
Email from* |
|
Name or email address that appears in the "From" field of emails sent by the Resmon service. |
|
Email recipients* (required) |
|
Email addresses to which Resmon sends the daily Resource Report and periodic Resource Depletion Alert Report. Entered as a colon-delimited list (such as . |
blank |
Email subject* |
|
Text string that appears in the "Subject" field of the standard daily report email, up to 128 characters. Enclose the text string in single-quotes (') or double-quotes (") if it contains spaces. A time stamp in |
STA Resource Monitor Report |
Output data file |
|
Absolute path of the Resource Report data file. The file name must end in |
|
Display the current settings for the Resmon service to determine if it is enabled.
Open a terminal session on the STA server, and log in as the Oracle user.
Display the current Resmon settings.
$ staresmonadm -Q
In this example, the Resmon service is enabled and configured.
$ staresmonadm –Q
Contacting daemon...connected.
Querying Preferences.
Current STA Resource Monitor Service Settings:
Configured [yes]
Send Reports -T [23:05]
Sleep Interval -i [3600 sec]
Alert Nagging -n [off]
DB Username -U [stadba]
DB Password -P [********]
DB Tablespace hwm -t [80%]
DB Backup hwm (/dbbackup) -b [70%]
DB Data hwm (/dbdata) -d [75%]
Log Volume hwm (/var/log/tbi) -l [75%]
Root Volume hwm (/) -z [75%]
Tmp Volume hwm (/tmp) -x [75%]
System Memory hwm -m [80%]
Email 'From:' -f [STAResmon@staserver.mycompany.com]
Email 'To:' -r [charlie@mycompany.com:lucy@mycompany.com]
Email 'Subject:' -s [STA Resource Monitor Report <staserver>]
Output File -o [/var/log/tbi/db/staresmon.csv]
Enable the Resmon service by defining required parameters. The Resmon service is disabled by default. Once enabled, the service scans the monitored resources on the STA server according to the defined settings.
On the STA server, open a terminal session. Log in as the Oracle user.
To enable the service, define the required parameters in one or more commands.
For a list of all parameters, see the table in Configure the Resource Monitor Using staresmonadm.
You must define at least the following settings:
All high-water marks, except system memory
Email 'To:'
Daily report send time
Sleep Interval
DB Username and Password—this is the database administrator user created during STA installation.
For example:
$ staresmonadm -t 80 -b 70 -d 75 -l 75 -z 75 -x 75 -m 80 -r charlie@mycompany.com -T 23:05 -i 3600 -U stadba -P
Resmon will run its first scan at the time you have specified; you do not have to stop and restart the STA services daemon.
If the utility fails with:
Error: java.util.prefs.BackingStoreException: Couldn't get file lock.
Disable the Resmon service by clearing all settings. When disabled, the service does not perform scans, send alerts, or produce reports.
Open a terminal session on the STA server, and log in as the Oracle user.
Clear all Resmon settings.
$ staresmonadm -C
The service is disabled immediately; you do not have to stop and restart the STA services daemon.
If the utility fails with:
Error: java.util.prefs.BackingStoreException: Couldn't get file lock.
Define email addresses to receive the daily Resource Report and periodic Resource Depletion Report. Define an email sender and subject line to help recipients identify and organize emails from the Resmon service.
Note:
The email server and sender address used by the Resmon service may be different than those used by the STA application. See the STA User's Guide for details about STA application emails.On the STA server, open a terminal session. Log in as the Oracle user.
Define email information.
To specify multiple recipients, separate the email addresses by a colon (:).
If the subject text includes spaces, enclose the text line in double-quotes (") or single-quotes (').
This example defines two email recipients, the email sender, and a subject line.
$ staresmonadm -r charlie@mycompany.com:lucy@mycompany.com -f STAResmon@staserver.mycompany.com -s "STA Resource Monitor Report for staserver"
If you want the new settings to take effect immediately, you must stop and restart the STA services daemon. See Services Daemon - Stop, Restart, or Show Status.
If the utility fails with:
Error: java.util.prefs.BackingStoreException: Couldn't get file lock.
If you are not receiving emails from Resmon, use the logs to verify that the service is sending emails, check your email server and filter settings, and verify the Resmon settings are correct.
If Resmon has sent out an email, it will be recorded in the log.
Open the staservd.log
located in the /var/log/tbi/db/backups
directory.
Look for the following messages:
INFO: {StaResMon} Alert report email complete. INFO: {StaResMon} Standard report email complete.
If you see either of the above messages, the Resmon service is sending emails. This means the issue may be with your email server or email filtering.
If you don't see the above messages in the log, Resmon has not sent an email. Verify the Resmon settings are correct.
The email service on your server may not be configured correctly or some email security features may be filtering out the Resmon emails. Make sure the "From" line has a legitimate host name. Use the staresmonadm -f command to modify.
If you did not see either of the logging message above and you are sure that Resmon should have sent an email based on the report time settings and alert settings, then verify the Resmon settings are correct. Use the staresmonadm -Q command to view the current settings. Make sure the DB username and password are set correctly for the STA DB mysql application.
Change the time of day when Resmon sends the Resource Report, the report file name, and location of the report file. If you specify a new file name, and the file does not already exist, the Resmon service creates it with the next scan.
On the STA server, open a terminal session. Log in as the Oracle user.
Define report information.
Use 24-hour notation to specify the time of day.
The file location must be an absolute, not relative, path. The database user must have read/write privileges to the directory.
The file name extension must be .csv
.
For example:
$ staresmonadm -T 23:59 -o /var/log/tbi/db/ResmonReport.csv
If you want the new settings to take effect immediately, you must stop and restart the STA services daemon. See Services Daemon - Stop, Restart, or Show Status.