Ispmanager 6 lite, pro, host

Resource consumption

The Resource Consumption section is available only on the host tariff.

Resource tracking helps to calculate the correct amount of resources and prevent server overloads.

Ispmanager accounts can generate and view reports on resource consumption. Administrators can generate reports for all users, resellers — for their users, users — only for themselves.

A report is generated only for periods, users and entities which there is data for. If there is no data, the report will not be generated.

How to enable

To collect statistics, a superuser account must activate the Resource consumption statistics collection service option in the Software Configuration section:


Generation of report

  1. Go to the Resource Consumption section.
  2. In the Period field, select the time period which the report should be generated for, or specify any range.
  3. In the Owner field (available to administrators only), select the owner of the users that will be displayed in the report.
  4. Click Create.

Report

The report allows you to see information about system resources used by each user and contains the following fields:

  • User (available to administrators and resellers) — list of users, whose data is presented in the table.
  • Owner (available to administrators only) — the administrator or reseller the user belongs to.
  • Commands executed — number of commands executed by the user during the selected period.
  • Memory used (average) —  the average amount of memory used by the process during the selected period. Defined as the total memory divided by the number of executed commands during the selected period.
  • Memory used (maximum) —  the maximum amount memory used by one process during the selected period.
  • Operation time (in minutes) — total operation time of the processes during the selected period.
  • Core CPU performance (in seconds) — processor time spent on executing the commands of the core.
  • User CPU performance (in seconds) — processor time spent on executing the commands of the applications .

To see a user's detailed statistics by date: click on the user's name → in the Period field, select a period or specify an arbitrary range → click Save.

Details

Collecting statistics

After statistics collection is enabled, the acct utility registers information about running processes to the /var/log/account/pacct log.

Statistics are generated based on this log file using the following methods:

  • collect_acct_daily_stat - analyzes the log at an interval equal to the value of the AcctStatCollectPeriod parameter in minutes (by default, once every 5 minutes).
  • collect_acct_monthly_stat - averages statistics for the previous day with an interval equal to the value of AcctStatCollectDailyPeriod parameter in minutes (by default, 1440 minutes = 24 hours).

The methods can be run manually using commands in the console:

mgrctl -m ispmgr collect_acct_daily_stat
mgrctl -m ispmgr collect_acct_monthly_stat

If run more often than the values of AcctStatCollectPeriod and AcctStatCollectDailyPeriod parameters, statistics will not be collected.

Storing statistics

Statistics are written to the files:

  • /usr/local/mgr5/var/stat/daily/useracct/@<user_name>/<year><month><number>.stat - for the collect_acct_daily_stat method (only files with statistics for the last two days are stored).
  • /usr/local/mgr5/var/stat/monthly/useracct/@<user_name>/<year><month>.stat - for the method collect_acct_monthly_stat.