https://github.com/pingcap/sysutil
sysutil is a library which implementats the gRPC service Diagnostics and shares the diagnostics functions between TiDB and PD.
https://github.com/pingcap/sysutil
Last synced: 11 months ago
JSON representation
sysutil is a library which implementats the gRPC service Diagnostics and shares the diagnostics functions between TiDB and PD.
- Host: GitHub
- URL: https://github.com/pingcap/sysutil
- Owner: pingcap
- License: apache-2.0
- Created: 2019-11-26T03:44:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-13T07:05:46.000Z (over 1 year ago)
- Last Synced: 2025-03-29T15:07:20.074Z (11 months ago)
- Language: Go
- Homepage:
- Size: 200 KB
- Stars: 6
- Watchers: 29
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sysutil
`sysutil` is a library which implementats the gRPC service [`Diagnostics`][1]
and shares the diagnostics functions between [TiDB][2] and [PD][3].
[1]: https://github.com/pingcap/kvproto/blob/master/proto/diagnosticspb.proto
[2]: https://github.com/pingcap/tidb
[3]: https://github.com/pingcap/pd
## Search log
The semantics of the log search service is: search for local log files, and filter using predicates, and then return the matched results.
The following are the predicates that the log interface needs to process:
- `start_time`: start time of the log retrieval (Unix timestamp, in milliseconds). If there is no such predicate, the default is 0.
- `end_time:`: end time of the log retrieval (Unix timestamp, in milliseconds). If there is no such predicate, the default is `int64::MAX`.
- `pattern`: filter pattern determined by the keyword. For example, `SELECT * FROM tidb_cluster_log` WHERE "%gc%" `%gc%` is the filtered keyword.
- `level`: log level; can be selected as DEBUG/INFO/WARN/WARNING/TRACE/CRITICAL/ERROR
- `limit`: the maximum of logs items to return, preventing the log from being too large and occupying a large bandwidth of the network.. If not specified, the default limit is 64k.
## System information collect
### Hardware
- CPU
- NIC
- Disk
- Memory
### System
- sysctl
- process list
### Load
- CPU
- Memory
- NIC
- Disk IO