From 28d40eb3f969daab96826f3862f32dc8e215ef11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sven=20M=C3=A4der?= <maeder@phys.ethz.ch>
Date: Fri, 28 Apr 2023 16:08:57 +0200
Subject: [PATCH] Add aliases for ssh with new session and ps with cgroups and
 threads

---
 profile/default/envrcd.d/20-aliases | 4 ++++
 profile/rda/envrcd.d/20-aliases     | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/profile/default/envrcd.d/20-aliases b/profile/default/envrcd.d/20-aliases
index a7ab0f9..d0d898d 100644
--- a/profile/default/envrcd.d/20-aliases
+++ b/profile/default/envrcd.d/20-aliases
@@ -28,6 +28,7 @@ alias lsa='ls -AF'
 alias llt='ls -hlFtr'
 alias lat='ls -hlAFtr'
 alias snk='ssh -o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null'
+alias snc='ssh -o ControlMaster=no -o ControlPath=none'
 alias ldapsearch='ldapsearch -o ldif-wrap=no'
 alias lds='ldapsearch -xZZ'
 alias ccze='ccze -A -o nolookups'
@@ -64,6 +65,9 @@ alias pping='prettyping'
 alias pping6='prettyping -6'
 alias p='prettyping -i 0.2'
 alias p6='p -6'
+alias psc='ps xawf -eo pid,user:12,cgroup:54,args'
+alias psct='ps xawf -ewwo pid,nlwp,ppid,c,tname,stat,time:12,user:12,cgroup:54,args'
+alias psctt='ps xaw -eTwwo pid,lwp,nlwp,ppid,c,tname,stat,time:12,user:12,cgroup:54,args'
 
 # use colordiff if it exists
 if [ $(which colordiff) ]; then
diff --git a/profile/rda/envrcd.d/20-aliases b/profile/rda/envrcd.d/20-aliases
index 76913ae..3a99f50 100644
--- a/profile/rda/envrcd.d/20-aliases
+++ b/profile/rda/envrcd.d/20-aliases
@@ -32,6 +32,7 @@ alias llt='ls -hlFtr'
 alias lat='ls -hlAFtr'
 alias s='ssh'
 alias snk='ssh -o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null'
+alias snc='ssh -o ControlMaster=no -o ControlPath=none'
 alias sr='ssh -J rda.ethz.ch'
 alias shci='ssh -J phd-jump-hci.ethz.ch'
 alias shit='ssh -J phd-jump-hit.ethz.ch'
@@ -86,6 +87,9 @@ alias pping='prettyping'
 alias pping6='prettyping -6'
 alias p='prettyping -i 0.2'
 alias p6='p -6'
+alias psc='ps xawf -eo pid,user:12,cgroup:54,args'
+alias psct='ps xawf -ewwo pid,nlwp,ppid,c,tname,stat,time:12,user:12,cgroup:54,args'
+alias psctt='ps xaw -eTwwo pid,lwp,nlwp,ppid,c,tname,stat,time:12,user:12,cgroup:54,args'
 alias a='ansible'
 alias a10='ANSIBLE_TIMEOUT=10 ansible'
 alias ap='ansible-playbook'
-- 
GitLab