polardbxengine/mysql-test/suite/ndb/r/ndbinfo_cpustat.result

159 lines
5.8 KiB
Plaintext

use ndbinfo;
Show view definitions
desc cpustat_50ms;
Field Type Null Key Default Extra
node_id int(10) unsigned YES NULL
thr_no int(10) unsigned YES NULL
OS_user_time int(10) unsigned YES NULL
OS_system_time int(10) unsigned YES NULL
OS_idle_time int(10) unsigned YES NULL
exec_time int(10) unsigned YES NULL
sleep_time int(10) unsigned YES NULL
spin_time int(10) unsigned YES NULL
send_time int(10) unsigned YES NULL
buffer_full_time int(10) unsigned YES NULL
elapsed_time int(10) unsigned YES NULL
desc cpustat_1sec;
Field Type Null Key Default Extra
node_id int(10) unsigned YES NULL
thr_no int(10) unsigned YES NULL
OS_user_time int(10) unsigned YES NULL
OS_system_time int(10) unsigned YES NULL
OS_idle_time int(10) unsigned YES NULL
exec_time int(10) unsigned YES NULL
sleep_time int(10) unsigned YES NULL
spin_time int(10) unsigned YES NULL
send_time int(10) unsigned YES NULL
buffer_full_time int(10) unsigned YES NULL
elapsed_time int(10) unsigned YES NULL
desc cpustat_20sec;
Field Type Null Key Default Extra
node_id int(10) unsigned YES NULL
thr_no int(10) unsigned YES NULL
OS_user_time int(10) unsigned YES NULL
OS_system_time int(10) unsigned YES NULL
OS_idle_time int(10) unsigned YES NULL
exec_time int(10) unsigned YES NULL
sleep_time int(10) unsigned YES NULL
spin_time int(10) unsigned YES NULL
send_time int(10) unsigned YES NULL
buffer_full_time int(10) unsigned YES NULL
elapsed_time int(10) unsigned YES NULL
desc cpustat;
Field Type Null Key Default Extra
node_id int(10) unsigned YES NULL
thr_no int(10) unsigned YES NULL
OS_user int(10) unsigned YES NULL
OS_system int(10) unsigned YES NULL
OS_idle int(10) unsigned YES NULL
thread_exec int(10) unsigned YES NULL
thread_sleeping int(10) unsigned YES NULL
thread_spinning int(10) unsigned YES NULL
thread_send int(10) unsigned YES NULL
thread_buffer_full int(10) unsigned YES NULL
elapsed_time int(10) unsigned YES NULL
Create temporary table for more diagnostics on failure
create temporary table cpustat_sum (
tstamp timestamp,
source char(20),
cnt int,
OS_user_time int,
OS_system_time int,
OS_idle_time int,
exec_time int,
sleep_time int,
spin_time int,
send_time int,
buffer_flule_time int,
elapsed_time int
);
Check that the tables 'fill' over time if they are not
already full
select @node_id:=node_id, @thr_no:=thr_no from cpustat_50ms limit 1;
There should be no invalid lines.
That is lines width longer duration than sampling period.
Expect zero as result.
select count(1) as invalid_lines from cpustat_50ms
where node_id=@node_id and thr_no=@thr_no and
OS_user_time > (2 * 1 * 1000000);
invalid_lines
0
select count(1) as invalid_lines from cpustat_1sec
where node_id=@node_id and thr_no=@thr_no and
OS_user_time > (2 * 20 * 1 * 1000000);
invalid_lines
0
select count(1) as invalid_lines from cpustat_20sec
where node_id=@node_id and thr_no=@thr_no and
OS_user_time > (2 * 20 * 20 * 1000000);
invalid_lines
0
Save line counts before sleep.
select count(1) into @start_lines_50ms from cpustat_50ms
where node_id=@node_id and thr_no=@thr_no;
select count(1) into @start_lines_1sec from cpustat_1sec
where node_id=@node_id and thr_no=@thr_no;
select count(1) into @start_lines_20sec from cpustat_20sec
where node_id=@node_id and thr_no=@thr_no;
insert into cpustat_sum
select now(), 'cpustat_50ms', count(*),
sum(OS_user_time), sum(OS_system_time), sum(OS_idle_time),
sum(exec_time), sum(sleep_time), sum(spin_time),
sum(send_time), sum(buffer_full_time), sum(elapsed_time)
from cpustat_50ms where node_id=@node_id and thr_no=@thr_no;
insert into cpustat_sum
select now(), 'cpustat_1sec', count(*),
sum(OS_user_time), sum(OS_system_time), sum(OS_idle_time),
sum(exec_time), sum(sleep_time), sum(spin_time),
sum(send_time), sum(buffer_full_time), sum(elapsed_time)
from cpustat_1sec where node_id=@node_id and thr_no=@thr_no;
insert into cpustat_sum
select now(), 'cpustat_20sec', count(*),
sum(OS_user_time), sum(OS_system_time), sum(OS_idle_time),
sum(exec_time), sum(sleep_time), sum(spin_time),
sum(send_time), sum(buffer_full_time), sum(elapsed_time)
from cpustat_20sec where node_id=@node_id and thr_no=@thr_no;
select now() into @sleep_start;
select now() into @sleep_end;
insert into cpustat_sum
select now(), 'cpustat_50ms', count(*),
sum(OS_user_time), sum(OS_system_time), sum(OS_idle_time),
sum(exec_time), sum(sleep_time), sum(spin_time),
sum(send_time), sum(buffer_full_time), sum(elapsed_time)
from cpustat_50ms where node_id=@node_id and thr_no=@thr_no;
insert into cpustat_sum
select now(), 'cpustat_1sec', count(*),
sum(OS_user_time), sum(OS_system_time), sum(OS_idle_time),
sum(exec_time), sum(sleep_time), sum(spin_time),
sum(send_time), sum(buffer_full_time), sum(elapsed_time)
from cpustat_1sec where node_id=@node_id and thr_no=@thr_no;
insert into cpustat_sum
select now(), 'cpustat_20sec', count(*),
sum(OS_user_time), sum(OS_system_time), sum(OS_idle_time),
sum(exec_time), sum(sleep_time), sum(spin_time),
sum(send_time), sum(buffer_full_time), sum(elapsed_time)
from cpustat_20sec where node_id=@node_id and thr_no=@thr_no;
select count(1) as invalid_lines from cpustat_50ms
where node_id=@node_id and thr_no=@thr_no and
OS_user_time > (2 * 1 * 1000000);
invalid_lines
0
select count(1) as invalid_lines from cpustat_1sec
where node_id=@node_id and thr_no=@thr_no and
OS_user_time > (2 * 20 * 1 * 1000000);
invalid_lines
0
select count(1) as invalid_lines from cpustat_20sec
where node_id=@node_id and thr_no=@thr_no and
OS_user_time > (2 * 20 * 20 * 1000000);
invalid_lines
0
Save line counts after sleep.
select count(1) into @later_lines_50ms from cpustat_50ms
where node_id=@node_id and thr_no=@thr_no;
select count(1) into @later_lines_1sec from cpustat_1sec
where node_id=@node_id and thr_no=@thr_no;
select count(1) into @later_lines_20sec from cpustat_20sec
where node_id=@node_id and thr_no=@thr_no;
drop table cpustat_sum;