{"id":26234002,"url":"https://github.com/teragrep/jos_01","last_synced_at":"2026-04-21T22:02:50.885Z","repository":{"id":253904691,"uuid":"801966813","full_name":"teragrep/jos_01","owner":"teragrep","description":"Teragrep Operating System Statistics Library for Java","archived":false,"fork":false,"pushed_at":"2024-08-23T09:50:16.000Z","size":51,"stargazers_count":0,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-31T13:37:33.445Z","etag":null,"topics":["java","library","linux","monitoring","operating-system-statistics","statistics","teragrep"],"latest_commit_sha":null,"homepage":"https://teragrep.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teragrep.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2024-05-17T08:59:48.000Z","updated_at":"2025-01-28T11:48:30.000Z","dependencies_parsed_at":"2024-08-21T02:46:49.700Z","dependency_job_id":null,"html_url":"https://github.com/teragrep/jos_01","commit_stats":null,"previous_names":["teragrep/jos_01"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/teragrep/jos_01","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjos_01","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjos_01/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjos_01/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjos_01/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teragrep","download_url":"https://codeload.github.com/teragrep/jos_01/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teragrep%2Fjos_01/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32112030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["java","library","linux","monitoring","operating-system-statistics","statistics","teragrep"],"created_at":"2025-03-13T01:18:25.885Z","updated_at":"2026-04-21T22:02:50.852Z","avatar_url":"https://github.com/teragrep.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Java Operating System Statistics (jos_01)\n\nThis project will extract statistics from the operating system and running processes into Java objects.\nYou can use this to easily get information such as memory usage about running processes and the operating system itself.\nThe information provided is based on the Linux filesystem's `/proc` files.\n\n== Features\n\n- Can be used to check if a process is alive by using process ID.\n- Provides the statistics of OS or any running process by using your system's `/proc` files as the source of truth.\n- Provides high level methods that calculate OS or process performance statistics automatically, such as `residentSetSize()`.\n- Can be used to create Java objects representing the current state of a `/proc` file and get access to the file's values.\n\nThis project can be used to easily create system or process monitoring solutions in Java applications.\n\n== Documentation\n\nSee the official documentation on https://docs.teragrep.com[docs.teragrep.com].\n\n== Limitations\n\n- Only supports Linux-based operating systems\n- Requires access to `/proc` files in order to function\n\n== How to use\n\n=== Requirements\n\n- Java version 1.8\n- Maven\n\n=== Installation\n\nInclude the following dependency into your project's pom.xml file:\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.teragrep\u003c/groupId\u003e\n      \u003cartifactId\u003ejos_01\u003c/artifactId\u003e\n    \u003c/dependency\u003e\n\n=== Usage\n\n==== Operating system statistics\n\nStart by creating a LinuxOS object.\nOptionally provide a configuration object by implementing `SysconfInterface` to manually configure the Operating system CPU tick rate.\nUse methods of LinuxOS object to get information on operating system.\n\n==== Process statistics\nCreate a Process object by supplying a valid process ID to Process' constructor.\nOptionally provide a specific LinuxOS object during construction, so that OS configuration is applied to Process object's methods.\n\n\n=== Examples of use\n\n==== Creating a new LinuxOS object with automatic configuration\n\n    LinuxOS os = new LinuxOS();\n\n==== Creating a new Process object with automatic configuration\n\n    Process process = new Process(250);\n\n==== Creating a new LinuxOS object with manual CPU tickrate configuration\n\n    LinuxOS os = new LinuxOS(SysconfInterface.Fake(100));\n\n==== CPU count of current system\n\n    LinuxOS os = new LinuxOS();\n    System.out.println(os.cpuCount());\n\n==== Manually configure CPU tickrate and get CpuTime of process with ID 1\n\n    LinuxOS os = new LinuxOS(SysconfInterface.Fake(1000));\n    Process process = new Process(1,os);\n    System.out.println(process.cpuTime());\n\n==== Access /proc/stat files of process with ID 250 and print out \"comm\" value\n\n    Process process = new Process(250);\n    Stat stat = process.stat();\n    System.out.println(stat.comm());\n\n== Contributing\n\nYou can involve yourself with our project by https://github.com/teragrep/jos_01/issues/new/choose[opening an issue] or submitting a pull request.\n\nContribution requirements:\n\n. *All changes must be accompanied by a new or changed test.* If you think testing is not required in your pull request, include a sufficient explanation as why you think so.\n. Security checks must pass\n. Pull requests must align with the principles and http://www.extremeprogramming.org/values.html[values] of extreme programming.\n. Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).\n\nRead more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].\n\n=== Contributor License Agreement\n\nContributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories.\n\nYou need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep's repositories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fjos_01","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteragrep%2Fjos_01","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteragrep%2Fjos_01/lists"}