sc_crawler.inspector_rules
Rules for which servers and managed databases the Inspector runs its tasks on.
Functions:
- has_related_database – Check if the server is the underlying server of any Database of the same Vendor.
- is_credit_exempt – Check if the task should run on the resource despite exhausted cloud credits.
- block_reasons – Check in a deterministic way if the resource should run the given inspector task(s).
func has_related_database inspector_rules.py:65–76
has_related_database(server)
Check if the server is the underlying server of any Database of the same Vendor.
Parameters:
- server (
Server) – The server to look up in theserver_idof the Vendor's Databases.
Returns:
bool – True if at least one Database of the Vendor references the server.
func is_credit_exempt inspector_rules.py:79–98
is_credit_exempt(resource, task)
Check if the task should run on the resource despite exhausted cloud credits.
Parameters:
- resource (
Server|Database) – The server or managed database. - task (
str) – Name of an inspector task.
Returns:
bool – True if the cloud credit block reason doesn't apply.
func block_reasons inspector_rules.py:101–219
block_reasons(resource, tasks)
Check in a deterministic way if the resource should run the given inspector task(s).
Lists of inspector tasks defined at https://github.com/SpareCores/sc-inspector/blob/main/inspector/tasks.py
A task doesn't run on a resource for any of these reasons:
-
All tasks:
- Cloud credits or budget exhausted: Alibaba Cloud, Azure and GCP,
except for a few explicitly exempted resources and tasks (see
is_credit_exempt).
- Cloud credits or budget exhausted: Alibaba Cloud, Azure and GCP,
except for a few explicitly exempted resources and tasks (see
-
Managed databases:
- Databases that can't be deployed on a single node.
-
Servers:
bw_membw_memThe memory bandwidth tool of LMbench. It moves data through a buffer of a given size in one of several modes, such asrd(read and sum an array),wr(write a constant to each element),rdwr(read, then write the same location), and the copy modescp,fcp, andbcopy. It reports the buffer size in MB and the bandwidth in MB/s; with-P, it runs several processes, each with its own buffer, and reports their total bandwidth.`bw_mem` manualGlossary andmembench: a few servers with identified performance issues while running this task.nvidia_smiandnvbandwidthnvbandwidthAn open-source NVIDIA tool that measures memory copy bandwidth and latency between the CPU and NVIDIA GPUs, between GPUs, and within one GPU. It copies with the GPU's copy engines or with kernels on its streaming multiprocessors, and reports one matrix per test, with a row and a column for each CPU or GPU taking part. It prints plain text or JSON, and an optional multinode build measures GPUs across several servers.GitHubGlossary: servers without GPUs.- Not enough memory:
membenchneeds 0.9 GB;compression_text,ffmpegandllm1 GB;vllmandpgbench_postgres_ro_durable2 GB;geekbench2.1 GB. vllm: fewer than 2 vCPUsvCPU: virtual CPUA CPU of a virtual machine, the unit in which cloud vendors sell compute. It is usually one hardware thread of a physical core with SMT, so two vCPUs may share one physical core.WikipediaGlossary (server and GuideLLMGuideLLMAn open-source tool of the vLLM project for evaluating LLM deployments. It sends synthetic or real requests to an inference server over an OpenAI-compatible HTTP API, at a fixed concurrency, a fixed request rate, or a sweep of rates, and measures latency and throughput, such as the time to first token and output tokens per second. It writes its results as JSON, CSV, or HTML reports.GuideLLM on GitHubGlossary contend for the single core; no successful measurements observed).geekbenchandpassmark: more than 32 vCPUs, as they don't scale beyond that.storage: no bundled storage.stressnglongrun: explicit allowlist for a few small AWS, GCP and Hetzner CloudHetzner CloudThe cloud platform of Hetzner Online, a German hosting company founded in 1997. Launched in 2018, it offers VMs with shared or dedicated vCPUs on AMD64 or Arm64 CPUs, block storage, and networking, from data centers in Germany, Finland, the United States, and Singapore.Hetzner CloudGlossary server types.
Parameters:
- resource (
Server|Database) – The server or managed database. - tasks (
str |List[str]) – Name of an inspector task, or a list of them.
Returns: