-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.xml
More file actions
129 lines (124 loc) · 5.49 KB
/
Copy pathpackage.xml
File metadata and controls
129 lines (124 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.10.13" version="2.1" xmlns="http://pear.php.net/dtd/package-2.1"
xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
http://pear.php.net/dtd/tasks-1.0.xsd
http://pear.php.net/dtd/package-2.1
http://pear.php.net/dtd/package-2.1.xsd">
<name>statgrab</name>
<channel>pecl.php.net</channel>
<summary>PHP bindings for libstatgrab: CPU, memory, disk, network, and process metrics.</summary>
<description>
PHP bindings for libstatgrab (https://libstatgrab.org), the
cross-platform system-statistics library. Reads CPU usage, memory
and swap, disk I/O, filesystem space and inode counts, network
interface counters, page-in/out, process tables, logged-in users,
and host metadata. Works on glibc Linux, musl, macOS, FreeBSD,
NetBSD, OpenBSD, and Solaris.
Two API surfaces ship in parallel: a procedural one matching the
original 2006 PECL release (sg_cpu_percent_usage, sg_memory_stats,
sg_process_stats, ...) and a Statgrab class with method-based
access and class constants for sort orders, process states, and
duplex modes. Both surfaces emit E_WARNING and return false on
libstatgrab errors; the OO surface throws on argument-count
violations. sg_error_details() returns array{code,errno,message,arg}
from libstatgrab (or false when no error is pending); the OO surface
exposes the same shape via Statgrab::errorDetails().
The repo also ships a vendored libstatgrab 0.92.1 with one local
patch fixing an sg_destroy_globals off-by-one that leaks the
user-stats vector at process exit (submitted upstream, not yet
released). Configure with --with-statgrab=bundled to statically
link the patched copy and ship the leak fix without waiting on
system packages.
Requires libstatgrab >= 0.92 and PHP >= 8.0 (NTS).
</description>
<lead>
<name>Ilia Alshanetsky</name>
<user>iliaa</user>
<email>ilia@ilia.ws</email>
<active>yes</active>
</lead>
<date>2026-09-03</date>
<version>
<release>2.2.2</release>
<api>2.2.2</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License 3.01</license>
<notes>
PHP 8.0 build fix, boundary hardening, and init-failure fixes.
- Build on PHP 8.0: ZEND_ACC_NOT_SERIALIZABLE is now gated to 8.1+.
- Free the CPU-percent result buffer on the zero-entries early return.
- Bundled-build instructions pass --with-pic so the static libstatgrab
links on x86_64.
- Register the Statgrab class and SG_* constants even when sg_init()
fails, instead of leaving a lopsided surface.
- Security hardening: reject embedded NUL bytes in
setValidFilesystems(), use overflow-safe allocation for the
filesystem array on 32-bit, mark Statgrab non-serializable.
See CHANGELOG.md for the full list.
</notes>
<contents>
<dir name="/">
<file name="config.m4" role="src" />
<file name="statgrab.c" role="src" />
<file name="statgrab.stub.php" role="src" />
<file name="statgrab_arginfo.h" role="src" />
<file name="php_statgrab.h" role="src" />
<file name="composer.json" role="doc" />
<file name="CREDITS" role="doc" />
<file name="CHANGELOG.md" role="doc" />
<file name="README.md" role="doc" />
<file name="LICENSE" role="doc" />
<file name="LICENSE.libstatgrab" role="doc" />
<dir name="tests">
<file name="001-load.phpt" role="test" />
<file name="002-host.phpt" role="test" />
<file name="003-load.phpt" role="test" />
<file name="004-memory.phpt" role="test" />
<file name="005-swap.phpt" role="test" />
<file name="006-cpu-percent.phpt" role="test" />
<file name="007-cpu-totals.phpt" role="test" />
<file name="008-process-count.phpt" role="test" />
<file name="009-fs.phpt" role="test" />
<file name="010-network-io.phpt" role="test" />
<file name="011-iface.phpt" role="test" />
<file name="012-pages.phpt" role="test" />
<file name="013-process-stats.phpt" role="test" />
<file name="014-process-sort.phpt" role="test" />
<file name="015-users.phpt" role="test" />
<file name="016-oo-class.phpt" role="test" />
<file name="017-no-args.phpt" role="test" />
<file name="018-tier-a-systime.phpt" role="test" />
<file name="019-valid-filesystems.phpt" role="test" />
<file name="020-snapshot.phpt" role="test" />
<file name="021-error-details.phpt" role="test" />
<file name="022-cpu-percent-source.phpt" role="test" />
<file name="023-tier-c-constants.phpt" role="test" />
<file name="024-set-valid-filesystems-typeerror.phpt" role="test" />
<file name="025-diskio.phpt" role="test" />
<file name="026-serialize-denied.phpt" role="test" />
<file name="027-set-valid-filesystems-nul.phpt" role="test" />
<file name="028-cpu-percent-sources.phpt" role="test" />
<file name="029-set-valid-filesystems-empty.phpt" role="test" />
</dir>
</dir>
</contents>
<dependencies>
<required>
<php>
<min>8.0.0</min>
<max>8.99.99</max>
</php>
<pearinstaller>
<min>1.10.0</min>
</pearinstaller>
</required>
</dependencies>
<providesextension>statgrab</providesextension>
<extsrcrelease/>
</package>