{"id":13808458,"url":"https://github.com/tessus/apachetop","last_synced_at":"2025-03-17T03:31:29.816Z","repository":{"id":32442111,"uuid":"36020366","full_name":"tessus/apachetop","owner":"tessus","description":"apachetop","archived":false,"fork":false,"pushed_at":"2024-02-12T15:52:49.000Z","size":268,"stargazers_count":41,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-27T17:34:39.626Z","etag":null,"topics":["apache-httpd","httpd","logging","monitoring","top"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tessus.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-05-21T15:18:01.000Z","updated_at":"2024-12-14T02:43:53.000Z","dependencies_parsed_at":"2024-08-04T01:09:03.828Z","dependency_job_id":"c754d228-bba5-4a97-899a-64493f89db98","html_url":"https://github.com/tessus/apachetop","commit_stats":{"total_commits":53,"total_committers":5,"mean_commits":10.6,"dds":"0.15094339622641506","last_synced_commit":"366bc052703358b353453c4312dc6004cb77b1e4"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tessus%2Fapachetop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tessus%2Fapachetop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tessus%2Fapachetop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tessus%2Fapachetop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tessus","download_url":"https://codeload.github.com/tessus/apachetop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841207,"owners_count":20356443,"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","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":["apache-httpd","httpd","logging","monitoring","top"],"created_at":"2024-08-04T01:01:43.266Z","updated_at":"2025-03-17T03:31:29.545Z","avatar_url":"https://github.com/tessus.png","language":"C++","funding_links":[],"categories":["C++","Table of Contents"],"sub_categories":[],"readme":"ApacheTop Readme\n\nApacheTop watches a logfile generated by Apache (in standard common or\ncombined logformat, and generates human-parsable output in realtime.\n\nSee the INSTALL file for ./configure options (there's a few newly added\nsince v0.11)\n\nSeveral commandline options dictate some of its' behaviour:\n-f logfile\n\tSelect which file to watch.\n\tSpecify this option multiple times to watch multiple files\n\n-H hits | -T time\n\tThese options are mutually exclusive. Specify only one, if any at\n\tall. They work as follows. ApacheTop maintains a table of\n\tinformation internally containing all the relevant information about\n\tthe hits it's seen. This table can only be a finite size, so you\n\tneed to decide how big it's going to be. You have two options.\n\tYou can either:\n\t\tUse -H to say \"remember \u003cthis many\u003e hits\"\n\tor\tUse -T to say \"remember all hits in \u003cthis many\u003e seconds\"\n\t\n\tThe default (at the moment) is to remember hits for 30 seconds.\n\tSetting this too large (whichever option you choose) will cause\n\tApacheTop to use more memory and more CPU time. My experimentation\n\tfinds that remembering no more than around 5000 requests works well.\n\n-q\n\tInstructs ApacheTop to keep the querystrings, not remove them\n\n-l\n\tInstructs ApacheTop to lowercase all URLs, thus /FOO and /foo are\n\ttreated as the same and accumulate the same statistics.\n\n-r\n\tEnable resolving of hosts/ips (you need adns!)\n\n-s segments\n\tInstructs ApacheTop to only keep the first \u003csegments\u003e parts of the\n\tpath. Trailing slashes are kept if present. Statistics are then\n\tmerged for each truncated url.\n\tThis is easiest to demonstrate with examples:\n\t-s 2 would produce the following:\n\t/media/x.jpg               -\u003e  /media/x.jpg\n\t/media/images/x.jpg        -\u003e  /media/images/\n\t/media/images/small/x.jpg  -\u003e  /media/images/\n\t/media/images/big/x.jpg    -\u003e  /media/images/\n\tStats for the last three URLs would be merged in this case.\n\n-p\n\tInstructs ApacheTop to keep the protocol (http:// usually) at the\n\tfront of its' referrer strings. Normal behaviour is to remove them\n\tto give more room to more useful information.\n\n\n-d secs\n\tSet default refresh delay, in seconds.\n\n\nOnce it's running, you'll see a display like this:\n\nlast hit: 09:17:07        atop runtime:  0 days, 00:58:20              09:17:08\nAll:       638924 reqs ( 182.65/sec)      3433539K ( 981.6K/sec)  (   5.4K/req)\n2xx:  455415 (71.3%) 3xx:  175745 (27.5%) 4xx:  7746 ( 1.2%) 5xx:    10 ( 0.0%)\nR ( 30s):    5195 reqs ( 173.17/sec)        25405K ( 846.8K/sec)  (   4.9K/req)\n2xx:    3447 (66.4%) 3xx:    1715 (33.0%) 4xx:    33 ( 0.6%) 5xx:     0 ( 0.0%)\n                                                                               \n REQS REQ/S    KB  KB/S URL                                                    \n  103   3.4  2983  99.4 /                                 \n   56   1.9   239   8.0 /tickerdata/story2.dat\n   47   1.6   104   3.6 /home/today/patina.js\n   44   1.5    82   2.8 /home/styles/home_d0e2ee.css\n\u003csnip\u003e\n\n\nThe top line displays the time the last hit was seen, how long it's been\nrunning, and the current time.\n\nThe next two lines display information about every single hit ApacheTop has\nprocessed in this incarnation.\nFirstly you see how many hits the data is representing. After that, the\naverage number of hits/second since starting. Following that, the total number\nof KB witnessed; then the average KB/sec. Finally you see the average KB per\nrequest.\nThe next line shows a breakdown of return codes; in this particular example you\ncan see that 71.3% of the hits returned a 2xx code. 27.5% were 3xx, and so on.\nYou also have the actual number of hits in each group.\n\nThe two lines below this are where the commandline options -h and -t come in.\nThe data in these lines reads the same as the two above them, but this data is\nonly for the hits remembered in ApacheTop's internal table (remember that?).\nYou can see how many seconds of data this represents in the R ( 30s) at the\nbeginning of the line. This is for 30 seconds. These two lines of information\nare good for a \"what is my server doing *right now*?\" scenario, while the two\nabove them are good for a picture over the course of a few minutes or hours.\n\nUnderneath this header, you'll see a list of URLs along with their relevant\nnumber of requests, requests per second, kb, and kb per second.\nThis list is generated from the internal table ApacheTop maintains. Thus, in\nthis example, the list is being generated from the last 30 seconds of data. You\ncan see the root page has been requested 103 times in the last 30 seconds,\nresulting in about 3.4 hits per second. Additionally, those 103 requests have\nresulted in 2983K of traffic, at an average of 99.4K/second.\n\nYou can see the individual number of return codes a given item has generated\nby pressing 'n'. This alternates the numbers columns between hits/bytes\nand return codes for each item.\n\n\nYou may sort this list by any of the first four columns; first press 's' to\nenter the 'sort submenu', and then one of the following:\n\tr\tSort by REQUESTS\n\tR\tSort by REQUESTS/SECOND\n\tb\tSort by BYTES\n\tB\tSort by BYTES/SECOND\n\nIf you are viewing return code breakdown, then you'll see the following:\n\t2\t2xx\n\t3\t3xx\n\t4\t4xx\n\t5\t5xx\n\nThus you can see where all your Page Not Founds are coming from and so on.\nEach sort order is individually maintained, so you can sort by 3xx, and\nBytes, for example, then freely switch between number modes (using 'n')\nwithout losing either setting.\n\nAdditionally, you can press d during runtime to switch the list of displayed\nitems between URLs, IPs, and REFERRERs. URLs is the default, and simply\ngroups together hits on your site and provides collated stats for each one.\nIPs, similarly, groups hits from each IP and shows you stats for it. So you\ncan see how much bandwidth is being used by any given IP. REFERRERs is handy\nif you want to see where your traffic is coming from. The stats here reflect\nhow many pages/kbytes have been served as a result of a particular referrer.\n\nTo hold the current screen at any time, press p - statistics will still be\ngenerated in the background, but whatever is displayed at the current time\nis kept onscreen until you press p again.\n\nThe asterisk beside the URL/IP/Referrer entry in the table can be used to\nrestrict the display to any entry you're interested in. Use Up/Down arrow\nkeys to move the asterisk to an entry you're interested in (you can use 'p'\nto freeze the display to give you more time to do so) and then press Right\narrow to enter the display specific for that item.\n\t\n\tIf the item you expanded is a URL, then IPs and Referrers specific\n\tto that URL will be shown; ie, IPs (or hosts) which are visiting\n\tthat URL, and Referrers which are referring people to that URL.\n\n\tIf the item is an IP/Host, then URLs that IP/Host is visiting will\n\tbe displayed, along with the referrers that IP is coming from.\n\n\tIf the item is a Referrer, then URLs and IPs will be shown which\n\thave that Referrer.\n\nYou may turn off any of these subcolumns; press 't' to enter the toggle\nsubmenu, then:\n\tu\tToggles URL subdisplay\n\tr\tToggles REFERRER subdisplay\n\th\tToggles HOSTS subdisplay\n\nThus you can only display HOSTS that are visiting a given URL, etc.\nUse Left arrow to return to the previous display.\n\n\n\n\nBug reports and patches are very welcome. Please send any comments on.\n(if anyone fancies rewriting this README so its a bit more readable..)\nChris Elsworth \u003cchris@shagged.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftessus%2Fapachetop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftessus%2Fapachetop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftessus%2Fapachetop/lists"}