{"id":32382691,"url":"https://github.com/mdavidsaver/linstat","last_synced_at":"2025-10-25T01:49:44.459Z","repository":{"id":243548920,"uuid":"809944912","full_name":"mdavidsaver/linStat","owner":"mdavidsaver","description":"EPICS Driver to serve up Linux system and/or process specific information","archived":false,"fork":false,"pushed_at":"2025-09-30T22:26:48.000Z","size":409,"stargazers_count":5,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-01T00:10:51.266Z","etag":null,"topics":["epics"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdavidsaver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2024-06-03T18:47:23.000Z","updated_at":"2025-09-20T16:26:46.000Z","dependencies_parsed_at":"2024-06-09T19:31:24.401Z","dependency_job_id":"b3b9af42-67a7-47f8-8a1a-9484ba365008","html_url":"https://github.com/mdavidsaver/linStat","commit_stats":null,"previous_names":["mdavidsaver/linstat"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mdavidsaver/linStat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdavidsaver%2FlinStat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdavidsaver%2FlinStat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdavidsaver%2FlinStat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdavidsaver%2FlinStat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdavidsaver","download_url":"https://codeload.github.com/mdavidsaver/linStat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdavidsaver%2FlinStat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280893639,"owners_count":26409279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["epics"],"created_at":"2025-10-25T01:49:40.645Z","updated_at":"2025-10-25T01:49:44.453Z","avatar_url":"https://github.com/mdavidsaver.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux Statistics Driver\n\nAn EPICS Driver to serve up Linux system and/or process\nspecific information from an IOC.\n\nRequires:\n\n- EPICS Base \u003e= 7.0.4\n- gcc or clang with c++17 support (GCC \u003e= 8.5)\n- Linux \u003e= 4.12\n\n![Example OPI](documentation/example.png)\n\n## Comparison with iocStats\n\nThis module provides a super-set for the information provided by\n[iocStats](https://github.com/epics-modules/iocStats)\nwhere possible with the same record names.\nHowever unlike iocStats, this module is limited to Linux.\n\n| linStat | iocStats | Description |\n|---------|----------|-------------|\n|    X    |     X    | CPU Usage   |\n|    X    |     X    | Mem Usage   |\n|    X    |     X    | FD Usage    |\n|    X    |     X    | DB Scan stats. |\n|    X    |          | malloc() stats |\n|    X    |          | Swap Usage  |\n|    X    |          | IP Stats.   |\n|    X    |          | NIC Stats.  |\n|    X    |          | FS Usage    |\n\nAdditional information provided by linStat includes:\n\n- `$(IOC):SYS_TOT_LOAD` CPU usage including overheads (IRQ handling, I/O waits, ...)\n- IP stack statistics, host and process\n- Network Interface Card (NIC) statistics\n- File System usage\n\n## Building\n\n```sh\ngit clone https://github.com/mdavidsaver/linStat\ncd linStat\necho \"EPICS_BASE=/path/to/epics-base\" \u003e\u003e configure/RELEASE.local\nmake\n# Optionally \"make LINSTAT_BUILD_EXAMPLE=NO\"\n# to omit building linStatDemo application.\n```\n\n## Including in an IOC\n\nStarting from a template produced by:\n\n```sh\nmakeBaseApp.pl -t ioc my\nmakeBaseApp.pl -t ioc -i -p myApp myioc\n```\n\nEdit and append `configure/RELEASE` (or create `configure/RELEASE.local`)\nto set the path to the built linStat tree.\n\n```make\nLINSTAT=/path/to/linStat\n```\n\nOptionally edit `myApp/Db/Makefile`.\nRecommended when building with `STATIC_BUILD=NO`.\n\n```make\n#  ADD MACRO DEFINITIONS AFTER THIS LINE\n\nifdef LINSTAT_0_0_0                                      # \u003c----- Add\nDB_INSTALLS += $(wildcard $(LINSTAT_TOP)/db/linStat*.db) # \u003c----- Add\nendif                                                    # \u003c----- Add\n```\n\nEdit `myApp/src/Makefile`.\n\n```make\n# ... myApp/src/Makefile\nPROD_IOC += myapp\nDBD += myapp.dbd\n...\nmyapp_SRCS += myapp_registerRecordDeviceDriver.cpp\nmyapp_DBD += base.dbd\n\nifdef LINSTAT_0_0_0            # \u003c----- Add\nlinStatDemo_DBD += linStat.dbd # \u003c----- Add\nlinStatDemo_LIBS += linStat    # \u003c----- Add\nendif                          # \u003c----- Add\n\nmyapp_LIBS +=  $(EPICS_BASE_IOC_LIBS)\n```\n\nCreate/overwrite `iocBoot/iocmyioc/st.cmd`.\n\n```sh\n# iocBoot/iocmyioc/st.cmd\n#!../../linux-x86_64/myapp\n\n# search PATH for dbLoadRecords()\n# If no DB_INSTALLS for linStat*.db, then append LINSTAT /db directory.\nepicsEnvSet(\"EPICS_DB_INCLUDE_PATH\", \"$(PWD)../../db\")\n\ndbLoadDatabase(\"../../dbd/myapp.dbd\")\nmyapp_registerRecordDeviceDriver(pdbbase)\n\n\n# Replace \"LOCALHOST\" with a unique record name prefix\nepicsEnvSet(\"IOC\", \"LOCALHOST\")\n\n# Optional information\n#epicsEnvSet(\"ENGINEER\", \"Respectible Name\")\n#epicsEnvSet(\"LOCATION\", \"Where am I?\")\n\n# (un)comment some or all of the following dbLoadRecords before iocInit.\n\n# System-wide information\ndbLoadRecords(\"../../db/linStatHost.db\",\"IOC=$(IOC)\")\n\n# IOC process specific information\ndbLoadRecords(\"../../db/linStatProc.db\",\"IOC=$(IOC)\")\n\n# Network interface information\ndbLoadRecords(\"../../db/linStatNIC.db\",\"IOC=$(IOC),NIC=lo\")\n# may repeat with different NIC= network interface name(s)\n#dbLoadRecords(\"../../db/linStatNIC.db\",\"IOC=$(IOC),NIC=eth0\")\n\n# File system mount point information\ndbLoadRecords(\"../../db/linStatFS.db\",\"P=$(IOC):ROOT,DIR=/\")\n# may repeat with different file system mount points\n# change both P= and DIR=\n#dbLoadRecords(\"../../db/linStatFS.db\",\"P=$(IOC):DATA,DIR=/data\")\n\niocInit()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdavidsaver%2Flinstat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdavidsaver%2Flinstat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdavidsaver%2Flinstat/lists"}