1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-20 01:42:27 +03:00
Files
mariadb-columnstore-engine/utils/scenarios/perf/source/pf/fm/ps.sh
2016-01-06 14:08:59 -06:00

30 lines
768 B
Bash
Executable File

#! /bin/sh
#
#/*******************************************************************************
#* Script Name: ps.sh
#* Date Created: 2009.01.27
#* Author: Stephen Cargile
#* Purpose: capture system activity every x seconds
#*
#******************************************************************************/
#
cd /usr/local/prat/kernel
if [ ! -d /usr/local/prat/kernel/`date +%m%d%y` ]
then
mkdir `date +%m%d%y`
else
cd `date +%m%d%y`
hostname > ps_`date +%R`.txt
date >> ps_`date +%R`.txt
/bin/ps -leaf >> ps_`date +%R`.txt
fi
if [ -f /usr/bin/pstree ]
then
/usr/bin/pstree -G > pstree_`date +%R`.txt
else
echo "binary /usr/bin/pstree not installed." > pstree_`date +%R`.txt
fi
# End of script