1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-30 12:40:03 +02:00

Add content for vmstat

This commit is contained in:
Kamran Ahmed
2022-10-11 19:45:21 +04:00
parent 22fd69a5e8
commit 5f2a9496f7
4 changed files with 21 additions and 13 deletions

View File

@@ -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>

View File

@@ -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",

View File

@@ -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"

9
scripts/squash-merge.sh Executable file
View File

@@ -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"