Problem -
Had an issue with a large queue file on one of our Production queue managers.
Solution –
Let us change the fsize value to unlimited or -1 [fsize stands for - The largest file that a user can create.]
# lsuser mqm
mqm id=30031 pgrp=mqm groups=mqm,mqbrkrs home=/var/mqm shell=/usr/bin/ksh gecos=MQM Application login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=2 registry=files SYSTEM=compat logintimes= loginretries=0 pwdwarntime=0 account_locked=false minage=0 maxage=0 maxexpired=-1 minalpha=0 minother=0 mindiff=0 maxrepeats=8 minlen=0 histexpire=0 histsize=0 pwdchecks= dictionlist= fsize=2097151 cpu=-1 data=-1 stack=65536 core=2097151 rss=65536 nofiles=2000 data_hard=-1 time_last_unsuccessful_login=1241892309 tty_last_unsuccessful_login=ssh host_last_unsuccessful_login=asdemq3.sdde.deere.com unsuccessful_login_count=11 roles=
# chuser fsize='-1' mqm
# echo $?
0
# lsuser mqm
mqm id=30031 pgrp=mqm groups=mqm,mqbrkrs home=/var/mqm shell=/usr/bin/ksh gecos=MQM Application login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=2 registry=files SYSTEM=compat logintimes= loginretries=0 pwdwarntime=0 account_locked=false minage=0 maxage=0 maxexpired=-1 minalpha=0 minother=0 mindiff=0 maxrepeats=8 minlen=0 histexpire=0 histsize=0 pwdchecks= dictionlist= fsize=-1 cpu=-1 data=-1 stack=65536 core=2097151 rss=65536 nofiles=2000 data_hard=-1 time_last_unsuccessful_login=1241892309 tty_last_unsuccessful_login=ssh host_last_unsuccessful_login=asdemq3.sdde.deere.com unsuccessful_login_count=11 roles=
Now login as a mqm user
$ id
uid=30031(mqm) gid=30109(mqm) groups=32989(mqbrkrs)
Now we will test/verify if we can create big files say of size 3G
So, lets create a file of size 1G to be start with
$ /usr/sbin/lmktemp test 1073741824 >>>> lmktemp is the command which can be used to create temp file or else you can also use dd command. Or one can use below small script too however can be optional as we have plenty of options...
#!/usr/bin/perl -w
my $buf = ' ' x (1024 * 1024);
my $i;
open(F,'>mybigfile') || die "can't open file\n$!\n";
for($i=0;$i<2048;$i++){
print F $buf;
}
close(F);
Create a second 1GB file:
$ cp test test01
To create a 2GB file, append the first file to the second file:
$ cat test >> test01
To create a 3GB file, append the first file to the second file again:
$ cat test >> test01
$ ls -l
total 8388608
drwxrwx--- 3 mqm mqm 256 Dec 16 2007 MQGWP2
drwxr-xr-x 2 mqm mqm 256 Jun 20 2007 lost+found
-rw-rw-r-- 1 mqm mqm 1073741824 Oct 06 09:23 test
-rw-rw-r-- 1 mqm mqm 3221225472 Oct 06 09:24 test01
Cool, now I can create big file after changing fsize value to -1.
No comments:
Post a Comment