justadollar
Verified User
- Joined
- Dec 8, 2004
- Messages
- 21
That's just something that happens on DA servers. I'm not sure why it does, but every da server I've examined mod_status on does it.
XBL said:@ RayManZ: You set the 'zero' to the actual suspend limit (is kind of confusing, I had to read it from monitor.php).
@ Everyone: I made a small script to monitor the database. Current functions:
Any ideas on what to add are very welcome (e-mail (jochem at vuilnisbak dot com) or PM).
- Order by:
- Domain
- CPU Usage
- Processes
- Descending and Ascending
- Search by domain
Download: domainmonitor.php
Test: domainmonitor/.
Username: admin
Password: password
The stats are live from the database.
[edit]I also recommend to set the $__url_source (in conf/configure.php) to http://localhost/server-status (replace server-status with whatever you're using). And change
ToCode:ExtendedStatus On <Location /server-status> SetHandler server-status </Location>
Security before everything .[/edit]Code:ExtendedStatus On <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from localhost </Location>
Jochem
Warning: array_sum(): The argument should be an array in /home/admin/domains/******.***/public_html/server-status/domainmonitor.php on line 116
Warning: Division by zero in /home/admin/domains/******.***/public_html/server-status/domainmonitor.php on line 117
Warning: array_sum(): The argument should be an array in /home/admin/domains/******.***/public_html/server-status/domainmonitor.php on line 118
Warning: Division by zero in /home/admin/domains/******.***/public_html/server-status/domainmonitor.php on line 119
@how@ said:i get error
Code:Warning: array_sum(): The argument should be an array in /home/admin/domains/******.***/public_html/server-status/domainmonitor.php on line 116 Warning: Division by zero in /home/admin/domains/******.***/public_html/server-status/domainmonitor.php on line 117 Warning: array_sum(): The argument should be an array in /home/admin/domains/******.***/public_html/server-status/domainmonitor.php on line 118 Warning: Division by zero in /home/admin/domains/******.***/public_html/server-status/domainmonitor.php on line 119
chatwizrd said:I have some bug or something...
[root@matrix:/home/admin/domain.monitor] php monitor.php
fatal error: UPDATE cpu_monitor SET status='warned' WHERE domain='games******.net'<p>mysql error: Unknown column 'status' in 'field list'<br>mysql error code: 1054[root@matrix:/home/admin/domain.monitor]
CREATE TABLE cpu_monitor (
domain varchar(70) NOT NULL default '',
status varchar(10) NOT NULL default '',
cpu_x1 float(4,2) NOT NULL default '0.00',
cpu_x2 float(4,2) NOT NULL default '0.00',
cpu_x3 float(4,2) NOT NULL default '0.00',
processes_x1 float(4,2) NOT NULL default '0.00',
processes_x2 float(4,2) NOT NULL default '0.00',
processes_x3 float(4,2) NOT NULL default '0.00',
PRIMARY KEY (domain)
) TYPE=MyISAM;
I wouldn't set the __proc values too low or the script will send out emails for trivial reasons. I don't know what reasonable numbers should be for the processes, best to look at the database and see what looks 'normal'.Also I would like to know what proper settings would be for:
// 0 = disabled
$__cpu_warning = 1;
$__cpu_suspend = 0;
// 0 = disabled
$__proc_warning = 1;
$__proc_suspend = 0;
Just pick any number I want or what?
php safemode is disabled.hostpc.com said:Sounds like safe mode is enabled for that domain
no kidding?XBL said:The user which executes the script (probably 'apache') appears not to be allowed to read /usr/local/directadmin/data/users. You have to make sure apache can read the directory.
Jochem