Add content for vmstat

pull/2413/head
Kamran Ahmed 2 years ago
parent 22fd69a5e8
commit 5f2a9496f7
  1. 8
      content/roadmaps/102-devops/content/102-managing-servers/101-live-in-terminal/109-vmstat.md
  2. 1
      package.json
  3. 16
      scripts/pr-review.sh
  4. 9
      scripts/squash-merge.sh

@ -1 +1,7 @@
# Vmstat
# Vmstat
`vmstat` (**V**irtual **M**emory **Stat**istics) is a performance monitoring command. It is used to obtain information about memory, system processes, paging, interrupts, block I/O, disk, and CPU scheduling. Users can observe system activity virtually in real time by specifying a sampling period.
<ResourceGroupTitle>Useful Links</ResourceGroupTitle>
<BadgeLink colorScheme='blue' badgeText='Man page' href='https://man7.org/linux/man-pages/man8/vmstat.8.html'>vmstat man page</BadgeLink>
<BadgeLink colorScheme='blue' badgeText='Tutorial' href='https://phoenixnap.com/kb/vmstat-command'>vmstat tutorial</BadgeLink>

@ -4,7 +4,6 @@
"private": true,
"license": "BSD-4-Clause",
"scripts": {
"review": "./scripts/pr-review.sh",
"dev": "next",
"serve:out": "serve out",
"build": "./scripts/build.sh",

@ -15,16 +15,10 @@ require jq
require gh
require fzf
# get the list of open pull requests
prs=$(gh pr list --json number,title --limit 100 | jq -r '.[] | "\(.number) \(.title)"')
prd="$(gh pr list --json 'number,title' | jq -r '.[]| [.number, .title] | @sh' | column -t -s"'" | fzf)"
[ -z "$prd" ] && echo "No PR selected" && exit 0
# select a pr
pr=$(echo "$prs" | fzf --prompt="Select a PR: " --height=50% --reverse --preview="gh pr view {1} --json 'files' | jq -r '.files|map(.path)|.[]'")
pr_id="$(echo "$prd" | awk '{print $1}')"
# get the pr number
pr_number=$(echo "$pr" | awk '{print $1}')
[ -z "$pr_number" ] && echo "🛑 No PR selected" && exit 1
echo "Checkout PR: $pr_number"
gh pr checkout "$pr_number"
gh pr view "$pr_id" --json "files" | jq -r '.files|map(.path)|.[]'
gh pr checkout "$pr_id"

@ -0,0 +1,9 @@
#!/bin/sh
set -e
git reset --soft HEAD~$(git rev-list --count HEAD ^master)
git checkout master
git add -A
git commit -m "$1"
Loading…
Cancel
Save