{AJS構築}15.2.24 ファイル送信制限をするための設定

 

  • 物理ホスト

--設定
--エージェントで設定
/opt/jp1ajs2/bin/jajs_spmd_stop
/opt/jp1ajs2/bin/jajs_spmd_status

/opt/jp1ajs2/bin/jajs_config -k "[JP1_DEFAULT\JP1NBQAGENT\Job]" "SendFileSizeStatus"=dword:00000001
/opt/jp1ajs2/bin/jajs_config -k "[JP1_DEFAULT\JP1NBQAGENT\Job]" "LimitSendFileSize"=dword:00080000


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


--動作確認
vim /root/job1.sh

#!/bin/bash

date >> /root/job1.log
for i in `seq 1 100000`;do
echo "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
done

 

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;
el=job12,j,+240+48;
ar=(f=job11,t=job12,seq);
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";
soa=add;
sea=add;
un="root";
tho=0;
ex="mmm182";
}
unit=job12,,jp1admin,;
{
ty=j;
cm="job2";
sc="/root/job2.sh";
un="root";
tho=0;
ex="mmm182";
}
}
}

 

export JP1_USERNAME=jp1admin
/opt/jp1ajs2/bin/ajskill -F AJSROOT1 /jg1/jobnet1
/opt/jp1ajs2/bin/ajsleave -F AJSROOT1 /jg1/jobnet1
/opt/jp1ajs2/bin/ajsdefine -F AJSROOT1 -f -d / /root/unitbackup.txt
/opt/jp1ajs2/bin/ajsentry -F AJSROOT1 -n /jg1/jobnet1
/opt/jp1ajs2/bin/ajsshow -F AJSROOT1 -s /jg1/jobnet1
/opt/jp1ajs2/bin/ajsshow -F AJSROOT1 -R /jg1/jobnet1


-- 結果確認
-- マネージャで確認
grep KAVU4294-I /var/opt/hitachi/HNTRLib2/spool/*


-- エージェントで確認
grep KAVU3508-I /var/opt/hitachi/HNTRLib2/spool/*

 

  • 論理ホスト


--設定
--エージェントで設定

/etc/opt/jp1ajs2/jajs_stop.cluster mmm194
/opt/jp1ajs2/bin/jajs_spmd_status -h mmm194


/opt/jp1ajs2/bin/jajs_config -k "[mmm194\JP1NBQAGENT\Job]" "SendFileSizeStatus"=dword:00000001
/opt/jp1ajs2/bin/jajs_config -k "[mmm194\JP1NBQAGENT\Job]" "LimitSendFileSize"=dword:00080000


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

--動作確認
vim /mnt/sdc2/job1.sh

#!/bin/bash

date >> /mnt/sdc2/job1.log
for i in `seq 1 100000`;do
echo "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
done

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;
el=job12,j,+240+48;
ar=(f=job11,t=job12,seq);
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";
soa=add;
sea=add;
un="root";
tho=0;
ex="mmm194";
}
unit=job12,,jp1admin,;
{
ty=j;
cm="job2";
sc="/mnt/sdc2/job2.sh";
un="root";
tho=0;
ex="mmm194";
}
}
}

export JP1_USERNAME=jp1admin
/opt/jp1ajs2/bin/ajskill -F AJS3SCHEDULE001 /jg1/jobnet1
/opt/jp1ajs2/bin/ajsleave -F AJS3SCHEDULE001 /jg1/jobnet1
/opt/jp1ajs2/bin/ajsdefine -F AJS3SCHEDULE001 -f -d / /root/unitbackup.txt
/opt/jp1ajs2/bin/ajsentry -F AJS3SCHEDULE001 -n /jg1/jobnet1
/opt/jp1ajs2/bin/ajsshow -F AJS3SCHEDULE001 -s /jg1/jobnet1
/opt/jp1ajs2/bin/ajsshow -F AJS3SCHEDULE001 -R /jg1/jobnet1

-- 結果確認
-- マネージャで確認
grep KAVU4294-I /var/opt/hitachi/HNTRLib2/spool/*


-- エージェントで確認
grep KAVU3508-I /var/opt/hitachi/HNTRLib2/spool/*


--待機系への反映
--エージェント

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

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