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