@@ 216-228 (lines=13) @@ | ||
213 | * |
|
214 | * @return void |
|
215 | */ |
|
216 | private function _hostname() |
|
217 | { |
|
218 | if (PSI_USE_VHOST === true) { |
|
219 | $this->sys->setHostname(getenv('SERVER_NAME')); |
|
220 | } else { |
|
221 | if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) { |
|
222 | $ip = gethostbyname($result); |
|
223 | if ($ip != $result) { |
|
224 | $this->sys->setHostname(gethostbyaddr($ip)); |
|
225 | } |
|
226 | } |
|
227 | } |
|
228 | } |
|
229 | ||
230 | /** |
|
231 | * Physical memory information and Swap Space information |
@@ 102-115 (lines=14) @@ | ||
99 | * |
|
100 | * @return void |
|
101 | */ |
|
102 | protected function _hostname() |
|
103 | { |
|
104 | if (PSI_USE_VHOST === true) { |
|
105 | $this->sys->setHostname(getenv('SERVER_NAME')); |
|
106 | } else { |
|
107 | if (CommonFunctions::rfts('/proc/sys/kernel/hostname', $result, 1)) { |
|
108 | $result = trim($result); |
|
109 | $ip = gethostbyname($result); |
|
110 | if ($ip != $result) { |
|
111 | $this->sys->setHostname(gethostbyaddr($ip)); |
|
112 | } |
|
113 | } |
|
114 | } |
|
115 | } |
|
116 | ||
117 | /** |
|
118 | * Kernel Version |
@@ 232-244 (lines=13) @@ | ||
229 | * |
|
230 | * @return void |
|
231 | */ |
|
232 | private function _hostname() |
|
233 | { |
|
234 | if (PSI_USE_VHOST === true) { |
|
235 | $this->sys->setHostname(getenv('SERVER_NAME')); |
|
236 | } else { |
|
237 | if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) { |
|
238 | $ip = gethostbyname($result); |
|
239 | if ($ip != $result) { |
|
240 | $this->sys->setHostname(gethostbyaddr($ip)); |
|
241 | } |
|
242 | } |
|
243 | } |
|
244 | } |
|
245 | ||
246 | ||
247 | /** |
@@ 141-153 (lines=13) @@ | ||
138 | * |
|
139 | * @return void |
|
140 | */ |
|
141 | private function _hostname() |
|
142 | { |
|
143 | if (PSI_USE_VHOST === true) { |
|
144 | $this->sys->setHostname(getenv('SERVER_NAME')); |
|
145 | } else { |
|
146 | if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) { |
|
147 | $ip = gethostbyname($result); |
|
148 | if ($ip != $result) { |
|
149 | $this->sys->setHostname(gethostbyaddr($ip)); |
|
150 | } |
|
151 | } |
|
152 | } |
|
153 | } |
|
154 | ||
155 | /** |
|
156 | * Physical memory information and Swap Space information |
@@ 52-64 (lines=13) @@ | ||
49 | * |
|
50 | * @return void |
|
51 | */ |
|
52 | private function _hostname() |
|
53 | { |
|
54 | if (PSI_USE_VHOST === true) { |
|
55 | $this->sys->setHostname(getenv('SERVER_NAME')); |
|
56 | } else { |
|
57 | if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) { |
|
58 | $ip = gethostbyname($result); |
|
59 | if ($ip != $result) { |
|
60 | $this->sys->setHostname(gethostbyaddr($ip)); |
|
61 | } |
|
62 | } |
|
63 | } |
|
64 | } |
|
65 | ||
66 | /** |
|
67 | * Kernel Version |