perfmonger 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +6 -0
- data/.tachikoma.yml +1 -0
- data/.travis.yml +18 -6
- data/Gemfile +1 -3
- data/Guardfile +26 -0
- data/NEWS +21 -0
- data/README.md +8 -9
- data/Rakefile +33 -1
- data/core/Makefile +23 -0
- data/core/build.sh +48 -0
- data/core/perfmonger-player.go +165 -0
- data/core/perfmonger-recorder.go +296 -0
- data/core/perfmonger-summarizer.go +207 -0
- data/core/subsystem/Makefile +3 -0
- data/core/subsystem/perfmonger.go +60 -0
- data/core/subsystem/perfmonger_darwin.go +22 -0
- data/core/subsystem/perfmonger_linux.go +292 -0
- data/core/subsystem/perfmonger_linux_test.go +73 -0
- data/core/subsystem/stat.go +214 -0
- data/core/subsystem/stat_test.go +281 -0
- data/core/subsystem/usage.go +410 -0
- data/core/subsystem/usage_test.go +496 -0
- data/lib/exec/operationBinding.rb.svn-base +59 -0
- data/lib/exec/perfmonger-player_darwin_amd64 +0 -0
- data/lib/exec/perfmonger-player_linux_386 +0 -0
- data/lib/exec/perfmonger-player_linux_amd64 +0 -0
- data/lib/exec/perfmonger-recorder_darwin_amd64 +0 -0
- data/lib/exec/perfmonger-recorder_linux_386 +0 -0
- data/lib/exec/perfmonger-recorder_linux_amd64 +0 -0
- data/lib/exec/perfmonger-summarizer_darwin_amd64 +0 -0
- data/lib/exec/perfmonger-summarizer_linux_386 +0 -0
- data/lib/exec/perfmonger-summarizer_linux_amd64 +0 -0
- data/lib/exec/perfmonger-summary_linux_386 +0 -0
- data/lib/exec/perfmonger-summary_linux_amd64 +0 -0
- data/lib/perfmonger/cli.rb +8 -3
- data/lib/perfmonger/command/core.rb +62 -0
- data/lib/perfmonger/command/live.rb +39 -0
- data/lib/perfmonger/command/play.rb +56 -0
- data/lib/perfmonger/command/plot.rb +30 -22
- data/lib/perfmonger/command/record.rb +3 -2
- data/lib/perfmonger/command/record_option.rb +40 -59
- data/lib/perfmonger/command/server.rb +7 -2
- data/lib/perfmonger/command/stat.rb +2 -2
- data/lib/perfmonger/command/stat_option.rb +1 -1
- data/lib/perfmonger/command/summary.rb +11 -326
- data/lib/perfmonger/version.rb +1 -3
- data/lib/perfmonger.rb +3 -0
- data/misc/_perfmonger +128 -0
- data/misc/perfmonger-completion.bash +49 -0
- data/perfmonger.gemspec +6 -5
- data/spec/data/busy100.pgr +0 -0
- data/spec/fingerprint_spec.rb +35 -0
- data/spec/live_spec.rb +25 -0
- data/spec/perfmonger_spec.rb +37 -0
- data/spec/play_spec.rb +21 -0
- data/spec/plot_spec.rb +42 -0
- data/spec/record_spec.rb +15 -0
- data/spec/spec_helper.rb +33 -0
- data/spec/stat_spec.rb +15 -0
- data/spec/summary_spec.rb +51 -0
- data/spec/support/aruba.rb +11 -0
- data/wercker.yml +59 -0
- metadata +117 -45
- data/ext/perfmonger/extconf.rb +0 -19
- data/ext/perfmonger/perfmonger.h +0 -58
- data/ext/perfmonger/perfmonger_record.c +0 -754
- data/ext/perfmonger/sysstat/common.c +0 -627
- data/ext/perfmonger/sysstat/common.h +0 -207
- data/ext/perfmonger/sysstat/ioconf.c +0 -515
- data/ext/perfmonger/sysstat/ioconf.h +0 -84
- data/ext/perfmonger/sysstat/iostat.c +0 -1100
- data/ext/perfmonger/sysstat/iostat.h +0 -121
- data/ext/perfmonger/sysstat/libsysstat.h +0 -19
- data/ext/perfmonger/sysstat/mpstat.c +0 -953
- data/ext/perfmonger/sysstat/mpstat.h +0 -79
- data/ext/perfmonger/sysstat/rd_stats.c +0 -2388
- data/ext/perfmonger/sysstat/rd_stats.h +0 -651
- data/ext/perfmonger/sysstat/sysconfig.h +0 -13
- data/test/run-test.sh +0 -39
- data/test/spec/bin_spec.rb +0 -37
- data/test/spec/data/2devices.expected +0 -42
- data/test/spec/data/2devices.output +0 -42
- data/test/spec/spec_helper.rb +0 -20
- data/test/spec/summary_spec.rb +0 -193
- data/test/test-perfmonger.c +0 -145
- data/test/test.h +0 -9
@@ -1,121 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* iostat: report CPU and I/O statistics
|
3
|
-
* (C) 1999-2010 by Sebastien Godard (sysstat <at> orange.fr)
|
4
|
-
*/
|
5
|
-
|
6
|
-
#ifndef _IOSTAT_H
|
7
|
-
#define _IOSTAT_H
|
8
|
-
|
9
|
-
#include "common.h"
|
10
|
-
|
11
|
-
/* I_: iostat - D_: Display - F_: Flag */
|
12
|
-
#define I_D_CPU 0x00001
|
13
|
-
#define I_D_DISK 0x00002
|
14
|
-
#define I_D_TIMESTAMP 0x00004
|
15
|
-
#define I_D_EXTENDED 0x00008
|
16
|
-
#define I_D_PART_ALL 0x00010
|
17
|
-
#define I_D_KILOBYTES 0x00020
|
18
|
-
#define I_F_HAS_SYSFS 0x00040
|
19
|
-
#define I_D_DEBUG 0x00080
|
20
|
-
#define I_D_UNFILTERED 0x00100
|
21
|
-
#define I_D_MEGABYTES 0x00200
|
22
|
-
#define I_D_PARTITIONS 0x00400
|
23
|
-
#define I_F_HAS_DISKSTATS 0x00800
|
24
|
-
/* Unused 0x01000 */
|
25
|
-
/* Unused 0x02000 */
|
26
|
-
/* Unused 0x04000 */
|
27
|
-
/* Unused 0x08000 */
|
28
|
-
#define I_D_DEVMAP_NAME 0x10000
|
29
|
-
#define I_D_ISO 0x20000
|
30
|
-
/* Unused 0x40000 */
|
31
|
-
#define I_D_ZERO_OMIT 0x80000
|
32
|
-
|
33
|
-
#define DISPLAY_CPU(m) (((m) & I_D_CPU) == I_D_CPU)
|
34
|
-
#define DISPLAY_DISK(m) (((m) & I_D_DISK) == I_D_DISK)
|
35
|
-
#define DISPLAY_TIMESTAMP(m) (((m) & I_D_TIMESTAMP) == I_D_TIMESTAMP)
|
36
|
-
#define DISPLAY_EXTENDED(m) (((m) & I_D_EXTENDED) == I_D_EXTENDED)
|
37
|
-
#define DISPLAY_PART_ALL(m) (((m) & I_D_PART_ALL) == I_D_PART_ALL)
|
38
|
-
#define DISPLAY_KILOBYTES(m) (((m) & I_D_KILOBYTES) == I_D_KILOBYTES)
|
39
|
-
#define DISPLAY_MEGABYTES(m) (((m) & I_D_MEGABYTES) == I_D_MEGABYTES)
|
40
|
-
#define HAS_SYSFS(m) (((m) & I_F_HAS_SYSFS) == I_F_HAS_SYSFS)
|
41
|
-
#define DISPLAY_DEBUG(m) (((m) & I_D_DEBUG) == I_D_DEBUG)
|
42
|
-
#define DISPLAY_UNFILTERED(m) (((m) & I_D_UNFILTERED) == I_D_UNFILTERED)
|
43
|
-
#define DISPLAY_PARTITIONS(m) (((m) & I_D_PARTITIONS) == I_D_PARTITIONS)
|
44
|
-
#define HAS_DISKSTATS(m) (((m) & I_F_HAS_DISKSTATS) == I_F_HAS_DISKSTATS)
|
45
|
-
#define DISPLAY_DEVMAP_NAME(m) (((m) & I_D_DEVMAP_NAME) == I_D_DEVMAP_NAME)
|
46
|
-
#define DISPLAY_ISO(m) (((m) & I_D_ISO) == I_D_ISO)
|
47
|
-
#define DISPLAY_ZERO_OMIT(m) (((m) & I_D_ZERO_OMIT) == I_D_ZERO_OMIT)
|
48
|
-
|
49
|
-
/* Preallocation constats */
|
50
|
-
#define NR_DEV_PREALLOC 4
|
51
|
-
#define NR_DISK_PREALLOC 3
|
52
|
-
|
53
|
-
/* Environment variable */
|
54
|
-
#define ENV_POSIXLY_CORRECT "POSIXLY_CORRECT"
|
55
|
-
|
56
|
-
/*
|
57
|
-
* Structures for I/O stats.
|
58
|
-
* The number of structures allocated corresponds to the number of devices
|
59
|
-
* present in the system, plus a preallocation number to handle those
|
60
|
-
* that can be registered dynamically.
|
61
|
-
* The number of devices is found by using /sys filesystem (if mounted),
|
62
|
-
* or the number of "disk_io:" entries in /proc/stat (2.4 kernels),
|
63
|
-
* else the default value is 4 (for old kernels, which maintained stats
|
64
|
-
* for the first four devices in /proc/stat).
|
65
|
-
* For each io_stats structure allocated corresponds a io_hdr_stats structure.
|
66
|
-
* A io_stats structure is considered as unused or "free" (containing no stats
|
67
|
-
* for a particular device) if the 'major' field of the io_hdr_stats
|
68
|
-
* structure is set to 0.
|
69
|
-
*/
|
70
|
-
struct io_stats {
|
71
|
-
/* # of sectors read */
|
72
|
-
unsigned long long rd_sectors __attribute__ ((aligned (8)));
|
73
|
-
/* # of sectors written */
|
74
|
-
unsigned long long wr_sectors __attribute__ ((packed));
|
75
|
-
/* # of read operations issued to the device */
|
76
|
-
unsigned long rd_ios __attribute__ ((packed));
|
77
|
-
/* # of read requests merged */
|
78
|
-
unsigned long rd_merges __attribute__ ((packed));
|
79
|
-
/* Time of read requests in queue */
|
80
|
-
unsigned long rd_ticks __attribute__ ((packed));
|
81
|
-
/* # of write operations issued to the device */
|
82
|
-
unsigned long wr_ios __attribute__ ((packed));
|
83
|
-
/* # of write requests merged */
|
84
|
-
unsigned long wr_merges __attribute__ ((packed));
|
85
|
-
/* Time of write requests in queue */
|
86
|
-
unsigned long wr_ticks __attribute__ ((packed));
|
87
|
-
/* # of I/Os in progress */
|
88
|
-
unsigned long ios_pgr __attribute__ ((packed));
|
89
|
-
/* # of ticks total (for this device) for I/O */
|
90
|
-
unsigned long tot_ticks __attribute__ ((packed));
|
91
|
-
/* # of ticks requests spent in queue */
|
92
|
-
unsigned long rq_ticks __attribute__ ((packed));
|
93
|
-
/* # of I/O done since last reboot */
|
94
|
-
unsigned long dk_drive __attribute__ ((packed));
|
95
|
-
/* # of blocks read */
|
96
|
-
unsigned long dk_drive_rblk __attribute__ ((packed));
|
97
|
-
/* # of blocks written */
|
98
|
-
unsigned long dk_drive_wblk __attribute__ ((packed));
|
99
|
-
};
|
100
|
-
|
101
|
-
#define IO_STATS_SIZE (sizeof(struct io_stats))
|
102
|
-
|
103
|
-
struct io_hdr_stats {
|
104
|
-
unsigned int active __attribute__ ((aligned (4)));
|
105
|
-
unsigned int used __attribute__ ((packed));
|
106
|
-
char name[MAX_NAME_LEN];
|
107
|
-
};
|
108
|
-
|
109
|
-
#define IO_HDR_STATS_SIZE (sizeof(struct io_hdr_stats))
|
110
|
-
|
111
|
-
/* List of devices entered on the command line */
|
112
|
-
struct io_dlist {
|
113
|
-
/* Indicate whether its partitions are to be displayed or not */
|
114
|
-
int disp_part __attribute__ ((aligned (4)));
|
115
|
-
/* Device name */
|
116
|
-
char dev_name[MAX_NAME_LEN];
|
117
|
-
};
|
118
|
-
|
119
|
-
#define IO_DLIST_SIZE (sizeof(struct io_dlist))
|
120
|
-
|
121
|
-
#endif /* _IOSTAT_H */
|
@@ -1,19 +0,0 @@
|
|
1
|
-
#ifndef LIBIOSTAT_H
|
2
|
-
#define LIBIOSTAT_H
|
3
|
-
|
4
|
-
#include "iostat.h"
|
5
|
-
#include "mpstat.h"
|
6
|
-
|
7
|
-
void salloc_dev_list(int list_len);
|
8
|
-
void get_HZ(void);
|
9
|
-
void io_sys_init(void);
|
10
|
-
void io_sys_free(void);
|
11
|
-
void sfree_dev_list(void);
|
12
|
-
int update_dev_list(int *dlist_idx, char *device_name);
|
13
|
-
void read_diskstats_stat(int curr);
|
14
|
-
|
15
|
-
/* mpstat.c */
|
16
|
-
void read_interrupts_stat(char *file, struct stats_irqcpu *st_ic[], int ic_nr, int curr);
|
17
|
-
void salloc_mp_struct(int nr_cpus);
|
18
|
-
|
19
|
-
#endif
|