{AJS構築}15.7.1 稼働状況レポートの出力機能の設定

  • 物理ホスト

--設定
/opt/jp1ajs2/bin/jajs_spmd_stop
/opt/jp1ajs2/bin/jajs_spmd_status

--マネージャで設定
mkdir -p /root/ajsreport

/opt/jp1ajs2/bin/jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER\AJSROOT1]" "AJSREPORTUSE"="yes"
/opt/jp1ajs2/bin/jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER\AJSROOT1]" "AJSREPORTDIR"="/root/ajsreport"
/opt/jp1ajs2/bin/jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER\AJSROOT1]" "AJSREPORTSTOREDAYPERIOD"=dword:00000015


/opt/jp1ajs2/bin/jajs_spmd
/opt/jp1ajs2/bin/jajs_spmd_status


--動作確認
vim /root/job1.sh
#!/bin/bash
date


vim /root/unitbackup.txt

unit=jg1,,jp1admin,;
{
ty=g;
cm="jg1";
el=jobnet1,n,+0+0;
cl=su;
op=mo;
op=tu;
op=we;
op=th;
op=fr;
cl=sa;
unit=jobnet1,,jp1admin,;
{
ty=n;
cm="jobnet1";
sz=10x8;
el=job11,j,+80+48;
sd=1,2019/11/03;
st=1,23:58;
cy=1,(1,d);
sh=1,ca;
shd=1,2;
ex="mmm182";
unit=job11,,jp1admin,;
{
ty=j;
cm="job1";
sc="/root/job1.sh";
so="/root/1";
se="/root/2";
un="root";
tho=0;
ex="mmm182";
}
}
}

export JP1_USERNAME=jp1admin
/opt/jp1ajs2/bin/ajsleave -F AJSROOT1 /jg1/jobnet1
/opt/jp1ajs2/bin/ajsdefine -F AJSROOT1 -f -d / /root/unitbackup.txt
/opt/jp1ajs2/bin/ajsprint -F AJSROOT1 "/*"

while true; do
/opt/jp1ajs2/bin/ajsentry -F AJSROOT1 -n /jg1/jobnet1
sleep 1
done

ls -l /root/ajsreport

/opt/jp1ajs2/bin/ajsreport -F AJSROOT1
/opt/jp1ajs2/bin/ajsreport -F AJSROOT1 -n
/opt/jp1ajs2/bin/ajsreport -F AJSROOT1 -n -r 60

/opt/jp1ajs2/bin/ajsreport -F AJSROOT1 -b 2020/07/23 -s 15:00 -e 2020/07/24 -f 14:00 -i 60

 

  • 論理ホスト

--設定
/etc/opt/jp1ajs2/jajs_stop.cluster mmm190
/opt/jp1ajs2/bin/jajs_spmd_status -h mmm190

--マネージャで設定
mkdir -p /mnt/sdc2/ajsreport

/opt/jp1ajs2/bin/jajs_config -k "[mmm190\JP1AJSMANAGER\AJS3SCHEDULE001]" "AJSREPORTUSE"="yes"
/opt/jp1ajs2/bin/jajs_config -k "[mmm190\JP1AJSMANAGER\AJS3SCHEDULE001]" "AJSREPORTDIR"="/mnt/sdc2/ajsreport"
/opt/jp1ajs2/bin/jajs_config -k "[mmm190\JP1AJSMANAGER\AJS3SCHEDULE001]" "AJSREPORTSTOREDAYPERIOD"=dword:00000015


/etc/opt/jp1ajs2/jajs_start.cluster mmm190
/opt/jp1ajs2/bin/jajs_spmd_status -h mmm190

--動作確認
vim /mnt/sdc2/job1.sh
#!/bin/bash
date


vim /root/unitbackup.txt

unit=jg1,,jp1admin,;
{
ty=g;
cm="jg1";
el=jobnet1,n,+0+0;
cl=su;
op=mo;
op=tu;
op=we;
op=th;
op=fr;
cl=sa;
unit=jobnet1,,jp1admin,;
{
ty=n;
cm="jobnet1";
sz=10x8;
el=job11,j,+80+48;
sd=1,2019/11/03;
st=1,23:58;
cy=1,(1,d);
sh=1,ca;
shd=1,2;
ex="mmm194";
unit=job11,,jp1admin,;
{
ty=j;
cm="job1";
sc="/mnt/sdc2/job1.sh";
so="/mnt/sdc2/1";
se="/mnt/sdc2/2";
un="root";
tho=0;
ex="mmm194";
}
}
}

export JP1_USERNAME=jp1admin
/opt/jp1ajs2/bin/ajsleave -F AJS3SCHEDULE001 /jg1/jobnet1
/opt/jp1ajs2/bin/ajsdefine -F AJS3SCHEDULE001 -f -d / /root/unitbackup.txt
/opt/jp1ajs2/bin/ajsprint -F AJS3SCHEDULE001 "/*"

while true; do
/opt/jp1ajs2/bin/ajsentry -F AJS3SCHEDULE001 -n /jg1/jobnet1
sleep 1
done

ls -l /mnt/sdc2/ajsreport

/opt/jp1ajs2/bin/ajsreport -F AJS3SCHEDULE001
/opt/jp1ajs2/bin/ajsreport -F AJS3SCHEDULE001 -n
/opt/jp1ajs2/bin/ajsreport -F AJS3SCHEDULE001 -n -r 60

/opt/jp1ajs2/bin/ajsreport -F AJS3SCHEDULE001 -b 2020/07/23 -s 15:00 -e 2020/07/24 -f 14:00 -i 60


--待機系への反映
--マネージャ

共通定義情報の出力
/opt/jp1base/bin/jbsgetcnf -h mmm190 > /root/jbscnf.txt
scp /root/jbscnf.txt mmm192:/root

共通定義情報の取り込み
ssh mmm192 "/opt/jp1base/bin/jbssetcnf /root/jbscnf.txt"