Server for Information Technologies ������ ��������������
������� �������������� ����������
(095) 932-9212, 932-9213, 939-0783
E-mail: [email protected]
������ �������� ����(!) ������������� ���������� CIT Forum CD-ROM

SAR(1M)

��������
sar: sa1, sa2, sadc - ��������� ���������� � ���������������� �������

���������

	/usr/lib/sa/sadc  [��� �����] [���_����]
	/usr/lib/sa/sa1  [��� �����]
	/usr/lib/sa/sa2  [-u] [-b] [-d] [-y] [-c] [-w] [-a] [-q] [-v] [-m] [-A]
		         [-s �����] [-e �����] [-i ���]

��������
���������� � ���������������� ������� ����� �������� �� ������������ ������� ������������ [��. sar(1)] ��� �������������, � ������� ��������� ���� ��������. ������������ ������� ����� ����� ���������, ������� ������������� ��� ���������� ��������� ��������� ��������. ����������� ������������� �� � �������, ����/����� �� ����� � ����, �� ���������, ������������ ����� ����������, ���������� ��������� �������, ������ � ������, ������ � ���������, �������������� ����� ����������, ������ � ������������ ���������� � ���������� ���������.

������� sadc � shell-��������� sa1 � sa2 ������������ ��� �����, ���������� � ��������� ���� ������.

������� sadc, ������� ������, �������� ��������� ���������� �������� ����� ��� ����� ��������� ���������� ������ � ���������� �� � �������� ���� � ���_���� ��� �� ����������� �����. ���� ��������� ��� � ����� �������, ��������� ������ ������������ ����. ��� ����������� ������������ ��� �������� �������, ����� �������� ������, ����� ��� �������� ������������ � 0. ��������� ������� �� ����� /etc/init.d/perf

	su sys -c "/usr/lib/sa/sadc /usr/adm/sa/sa`date +%d`"

���������� � ���������� �������� ����������� ������, ���������� ���������� �������.

Shell-��������� sa1, ������� sadc, ������������ ��� ����� � ���������� ������ � �������� ���� � ����� /usr/adm/sa/sa��, ��� �� - ��� ������� ����. ����� ���������� ��� � ����� ��� ��, ��� � � ������ ������� sadc, �� ��������������� �������� ����� 1. ��������� ������ �� ����� /usr/spool/cron/crontabs/sys [��. cron(1M)]

	0 * * * 0,6 /usr/lib/sa/sa1
	20,40 8-17 * * 1-5 /usr/lib/sa/sa1

�������� � ����, ��� � ������� ����� ���������� ���������� ������ 20 �����, � � ��������� ����� - ���� ��� � ���.

Shell-��������� sa2, ������� sar(1), ���������� ���������� ����� � ���� /usr/adm/sa/sar��. ����� ����� ��� ��, ��� � � ������ sar(1). ��������� ������ �� ����� /usr/spool/cron/crontabs/sys

	5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -A

��������� ������ ��� �������� � ��������� ����������, ����������� � ������� �����.

��������� ��������� ����� � ���������� ����������� ������:

struct sa {
  struct sysinfo si; /* ��.  */
  struct minfo mi;   /* ��.  */
  struct dinfo di;   /* ��.  */
  int minserve, maxserve /* ���. � ����. �������������
                            ����������� ��� */
  int szinode;  /* ����� ����. � ����. ���������� ������ */
  int szfile;   /* ����� ����. � ����. ������ */
  int szproc;   /* ����� ����. � ����. ��������� */
  int szlckf;   /* ����� ����. � ����. "��������" ������ */
  int szlckr;   /* ����� ����. � ����. "��������" ������� */
  int mszinode; /* ������ ����. ���������� */
  int mszfile;  /* ������ ����. ������ */
  int mszproc;  /* ������ ����. ��������� */
  int mszlckf;  /* ����. ������ ����. "��������" ������ */
  int mszlckr;  /* ����. ������ ����. "��������" ������� */
  long inodeovf;/* ����� ������������ ����. ���������� */
  long fileovf; /* ����� ������������ ����. ������ */
  long procovf; /* ����� ������������ ����. ��������� */
  time_t ts;    /* ������� ����� */
  long  devio[NDEVS][4];  /* ���������� �� ����������� */
#define IO_OPS  0   /* ����� ����� �������� �� ����/����� */
#define IO_BCNT 1   /* ����� ����� ���������� ������ */
#define IO_ACT  2   /* ����� ����� �������� ������������
                       ���������� (� ������ �����) */
#define IO_RESP 3   /* ����� ����� ������ ���������� ��
                       �����/������ (� ������ �����) */
};

�����

	/usr/adm/sa/sa��     ����� � ���������� �����������.
	/usr/adm/sa/sar��    ����� � ����������� ��������.
	/tmp/sa.adrfl        ���� � ��������.

��. �����
cron(1M).
sag(1G), sar(1), timex(1) � ����������� ������������.
Comments: [email protected]
Designed by Andrey Novikov
Copyright © CIT