Solaris subagent: implemented System.Memory.Physical.* parameters
[public/netxms.git] / src / agent / subagents / sunos / sunos_subagent.h
1 /*
2 ** NetXMS subagent for SunOS/Solaris
3 ** Copyright (C) 2004 Victor Kirhenshtein
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License as published by
7 ** the Free Software Foundation; either version 2 of the License, or
8 ** (at your option) any later version.
9 **
10 ** This program is distributed in the hope that it will be useful,
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ** GNU General Public License for more details.
14 **
15 ** You should have received a copy of the GNU General Public License
16 ** along with this program; if not, write to the Free Software
17 ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 **
19 ** $module: sunos_subagent.h
20 **
21 **/
22
23 #ifndef _sunos_subagent_h_
24 #define _sunos_subagent_h_
25
26 #include <nms_common.h>
27 #include <nms_agent.h>
28 #include <nms_threads.h>
29 #include <fcntl.h>
30 #include <kstat.h>
31
32
33 //
34 // Disk info types
35 //
36
37 #define DISK_FREE 0
38 #define DISK_USED 1
39 #define DISK_TOTAL 2
40
41
42 //
43 // Request types for H_MemoryInfo
44 //
45
46 #define MEMINFO_PHYSICAL_FREE 1
47 #define MEMINFO_PHYSICAL_TOTAL 2
48 #define MEMINFO_PHYSICAL_USED 3
49 #define MEMINFO_SWAP_FREE 4
50 #define MEMINFO_SWAP_TOTAL 5
51 #define MEMINFO_SWAP_USED 6
52 #define MEMINFO_VIRTUAL_FREE 7
53 #define MEMINFO_VIRTUAL_TOTAL 8
54 #define MEMINFO_VIRTUAL_USED 9
55
56
57 //
58 // Types for Process.XXX() parameters
59 //
60
61 #define PROCINFO_IO_READ_B 1
62 #define PROCINFO_IO_READ_OP 2
63 #define PROCINFO_IO_WRITE_B 3
64 #define PROCINFO_IO_WRITE_OP 4
65 #define PROCINFO_KTIME 5
66 #define PROCINFO_PF 6
67 #define PROCINFO_UTIME 7
68 #define PROCINFO_VMSIZE 8
69 #define PROCINFO_WKSET 9
70
71
72 //
73 // Process list entry structure
74 //
75
76 typedef struct t_ProcEnt
77 {
78 unsigned int nPid;
79 char szProcName[128];
80 } PROC_ENT;
81
82
83 //
84 // Functions
85 //
86
87 int mac_addr_dlpi(char *pszIfName, u_char *pMacAddr);
88 LONG ReadKStatValue(char *pszModule, LONG nInstance, char *pszName,
89 char *pszStat, char *pValue, kstat_named_t *pRawValue);
90
91 THREAD_RESULT THREAD_CALL CPUStatCollector(void *pArg);
92
93
94 //
95 // Global variables
96 //
97
98 extern BOOL g_bShutdown;
99
100
101 #endif