{"id":37751438,"url":"https://github.com/haccht/tshistogram","last_synced_at":"2026-01-16T14:22:28.492Z","repository":{"id":206352163,"uuid":"716432980","full_name":"haccht/tshistogram","owner":"haccht","description":"Render time series data as a histogram in the terminal 📊","archived":false,"fork":false,"pushed_at":"2025-11-23T09:26:50.000Z","size":5664,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T11:18:02.646Z","etag":null,"topics":["cli","command-line","terminal","tool"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haccht.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":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-09T05:58:10.000Z","updated_at":"2025-11-23T09:26:49.000Z","dependencies_parsed_at":"2024-05-21T21:30:09.511Z","dependency_job_id":"48bde382-032c-4b92-b683-18ec0d56975f","html_url":"https://github.com/haccht/tshistogram","commit_stats":null,"previous_names":["haccht/tshistogram"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/haccht/tshistogram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haccht%2Ftshistogram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haccht%2Ftshistogram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haccht%2Ftshistogram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haccht%2Ftshistogram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haccht","download_url":"https://codeload.github.com/haccht/tshistogram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haccht%2Ftshistogram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":["cli","command-line","terminal","tool"],"created_at":"2026-01-16T14:22:28.424Z","updated_at":"2026-01-16T14:22:28.479Z","avatar_url":"https://github.com/haccht.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tshistogram\n\nRender time series data as a histogram in the terminal.\n\n## Features\n\n- **Automatic timestamp parsing**: By default, `tshistogram` automatically detects and parses various common timestamp formats. If you have a specific or ambiguous format, you can specify it with the `-f` option.\n- **Multi-series support**: `tshistogram` can process multiple time series from standard input or multiple files. The text on the line following the timestamp is treated as the series name. The histogram will then show different series with different colors (or characters) and display a legend.\n\n## Usage\n```\n$ tshistogram -h\nUsage:\n  tshistogram [Options] [file...]\n\nOptions:\n  -f, --format string       Input time format (default: auto)\n  -i, --interval duration   Bin width as duration (e.g. 30s, 1m, 1h) (default 5m0s)\n  -b, --barlength int       Length of the longest bar (default 120)\n  -L, --limit int           Maximum number of series to display (default 16)\n  -l, --location location   Time zone location (e.g., UTC, Asia/Tokyo) (default Local)\n      --color string        Markup bar color [never|always|auto] (default \"auto\")\n  -F, --separator string    Field separator between timestamp and series (default \" \")\n\nFormat Examples:\n  ANSIC       \"Mon Jan _2 15:04:05 2006\"\n  UnixDate    \"Mon Jan _2 15:04:05 MST 2006\"\n  RubyDate    \"Mon Jan 02 15:04:05 -0700 2006\"\n  RFC822      \"02 Jan 06 15:04 MST\"\n  RFC822Z     \"02 Jan 06 15:04 -0700\"\n  RFC850      \"Monday, 02-Jan-06 15:04:05 MST\"\n  RFC1123     \"Mon, 02 Jan 2006 15:04:05 MST\"\n  RFC1123Z    \"Mon, 02 Jan 2006 15:04:05 -0700\"\n  RFC3339     \"2006-01-02T15:04:05Z07:00\"\n  RFC3339Nano \"2006-01-02T15:04:05.999999999Z07:00\"\n  Kitchen     \"3:04PM\"\n  Stamp       \"Jan _2 15:04:05\"\n  StampMilli  \"Jan _2 15:04:05.000\"\n  StampMicro  \"Jan _2 15:04:05.000000\"\n  StampNano   \"Jan _2 15:04:05.000000000\"\n  DateTime    \"2006-01-02 15:04:05\"\n  DateOnly    \"2006-01-02\"\n  TimeOnly    \"15:04:05\"\n  Unix        \"1136239445\"\n  Unix-Milli  \"1136239445000\"\n  Unix-Micro  \"1136239445000000\"\n\n  Arbitrary formats are also supported. See https://pkg.go.dev/time as a reference.\n```\n\n`tshistogram` render histograms from the given list of time series list.\n\n```\n$ cat /var/log/syslog | tail -10\nNov  9 05:44:54 localhost rsyslogd: action 'action-0-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.2112.0 try https://www.rsyslog.com/e/2007 ]\nNov  9 05:44:54 localhost rsyslogd: action 'action-0-builtin:omfile' resumed (module 'builtin:omfile') [v8.2112.0 try https://www.rsyslog.com/e/2359 ]\nNov  9 05:44:54 localhost rsyslogd: action 'action-0-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.2112.0 try https://www.rsyslog.com/e/2007 ]\nNov  9 05:44:54 localhost rsyslogd: action 'action-0-builtin:omfile' resumed (module 'builtin:omfile') [v8.2112.0 try https://www.rsyslog.com/e/2359 ]\nNov  9 05:44:54 localhost rsyslogd: action 'action-0-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.2112.0 try https://www.rsyslog.com/e/2007 ]\nNov  9 05:44:54 localhost rsyslogd: action 'action-0-builtin:omfile' resumed (module 'builtin:omfile') [v8.2112.0 try https://www.rsyslog.com/e/2359 ]\nNov  9 05:44:54 localhost rsyslogd: action 'action-0-builtin:omfile' suspended (module 'builtin:omfile'), retry 0. There should be messages before this one giving the reason for suspension. [v8.2112.0 try https://www.rsyslog.com/e/2007 ]\nNov  9 05:44:54 localhost rsyslogd: action 'action-0-builtin:omfile' suspended (module 'builtin:omfile'), next retry is Thu Nov  9 05:45:24 2023, retry nbr 0. There should be messages before this one giving the reason for suspension. [v8.2112.0 try https://www.rsyslog.com/e/2007 ]\nNov  9 05:45:01 localhost CRON[1026406]: (root) CMD (command -v debian-sa1 \u003e /dev/null \u0026\u0026 debian-sa1 1 1)\nNov  9 05:45:12 localhost kernel: [2408786.637431] [UFW BLOCK] IN=eth0 OUT= MAC=f2:3c:93:6e:f2:1c:fe:ff:ff:ff:ff:ff:08:00 SRC=94.102.61.28 DST=172.233.65.222 LEN=40 TOS=0x00 PREC=0x00 TTL=238 ID=54321 PROTO=TCP SPT=35385 DPT=40933 WINDOW=65535 RES=0x00 SYN URGP=0 \n\n$ cat /var/log/syslog | tail -10 | cut -c1-15\nNov  9 05:44:54\nNov  9 05:44:54\nNov  9 05:44:54\nNov  9 05:44:54\nNov  9 05:44:54\nNov  9 05:44:54\nNov  9 05:44:54\nNov  9 05:44:54\nNov  9 05:45:01\nNov  9 05:45:12\n\n$ cat /var/log/syslog | tail -10000 | cut -c1-15 | tshistogram -i 15m -f stamp --location Asia/Tokyo\nTotal count = 10000\nTime range  = 2023-11-09T09:55:33+09:00 - 2023-11-09T15:01:18+09:00\n\n [ 2023-11-09T09:45:00+09:00 ]    164  ||||||||||||\n [ 2023-11-09T10:00:00+09:00 ]    448  ||||||||||||||||||||||||||||||||||\n [ 2023-11-09T10:15:00+09:00 ]    475  ||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T10:30:00+09:00 ]    471  ||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T10:45:00+09:00 ]    494  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T11:00:00+09:00 ]    468  ||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T11:15:00+09:00 ]    517  ||||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T11:30:00+09:00 ]    515  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T11:45:00+09:00 ]    452  ||||||||||||||||||||||||||||||||||\n [ 2023-11-09T12:00:00+09:00 ]    516  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T12:15:00+09:00 ]    473  ||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T12:30:00+09:00 ]    471  ||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T12:45:00+09:00 ]    516  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T13:00:00+09:00 ]    472  ||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T13:15:00+09:00 ]    496  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T13:30:00+09:00 ]    492  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T13:45:00+09:00 ]    516  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T14:00:00+09:00 ]    510  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T14:15:00+09:00 ]    498  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T14:30:00+09:00 ]    516  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T14:45:00+09:00 ]    473  ||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T15:00:00+09:00 ]     47  |||\n\n\n$ cat /var/log/syslog | cut -c1-15 | tshistogram -i 6h -f stamp --location Asia/Tokyo\nTotal count = 202378\nTime range  = 2023-11-05T09:19:13+09:00 - 2023-11-09T15:07:59+09:00\n\n [ 2023-11-05T09:00:00+09:00 ]  11600  |||||||||||||||||||||||||||||||||||||\n [ 2023-11-05T15:00:00+09:00 ]  12083  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-05T21:00:00+09:00 ]  12100  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-06T03:00:00+09:00 ]  12335  ||||||||||||||||||||||||||||||||||||||||\n [ 2023-11-06T09:00:00+09:00 ]  12148  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-06T15:00:00+09:00 ]  12010  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-06T21:00:00+09:00 ]  11928  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-07T03:00:00+09:00 ]  12286  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-07T09:00:00+09:00 ]  12100  |||||||||||||||||||||||||||||||||||||||\n [ 2023-11-07T15:00:00+09:00 ]  11914  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-07T21:00:00+09:00 ]  11789  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-08T03:00:00+09:00 ]  11536  |||||||||||||||||||||||||||||||||||||\n [ 2023-11-08T09:00:00+09:00 ]  11619  |||||||||||||||||||||||||||||||||||||\n [ 2023-11-08T15:00:00+09:00 ]  11626  |||||||||||||||||||||||||||||||||||||\n [ 2023-11-08T21:00:00+09:00 ]  11507  |||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T03:00:00+09:00 ]  11764  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T09:00:00+09:00 ]  11755  ||||||||||||||||||||||||||||||||||||||\n [ 2023-11-09T15:00:00+09:00 ]    278  \n```\n\n### Multi-series Example\n\nHere is an example with multi-series data. The `--color=never` flag is used to render the histogram with different characters for each series, which is useful for environments that don't support ANSI color codes.\n\n```\n$ cat \u003c\u003cEOF | tshistogram -i 1m --color=never\n\u003e 2023-11-09T10:00:15Z seriesA\n\u003e 2023-11-09T10:00:25Z seriesA\n\u003e 2023-11-09T10:00:35Z seriesB\n\u003e 2023-11-09T10:01:05Z seriesA\n\u003e 2023-11-09T10:01:45Z seriesC\n\u003e 2023-11-09T10:01:55Z seriesB\n\u003e EOF\nTotal count: 6\nTime range:  2023-11-09T19:00:15+09:00 - 2023-11-09T19:01:55+09:00\nLegend:\n    | = seriesA\n    x = seriesB\n    o = seriesC\n\n [ 2023-11-09T19:00:00+09:00 ]      3  ||||||||||||||||||||||||||||||||||||||||xxxxxxxxxxxxxxxxxxxx\n [ 2023-11-09T19:01:00+09:00 ]      3  ||||||||||||||||||||xxxxxxxxxxxxxxxxxxxxoooooooooooooooooooo\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaccht%2Ftshistogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaccht%2Ftshistogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaccht%2Ftshistogram/lists"}