Creating file of arbitrary size in Solaris

We use command for testing purpose on FS. I created a file name called "file.500mb" where i need size of  500MB.
Solaris :
# mkfile 500M file.500mb
# du -sh file.500mb
 500M   file.500mb
bash-3.00# ls -l file.500mb
-rw------T   1 root     root     524288000 Feb 17 04:11 file.500mb

We can also do this in other way as below, which creates size of 512MB, we can change the counts/bs  depend upon requirement. changing BS will make faster

# dd if=/dev/zero of=/file1g count=500 bs=1024k
500+0 records in
500+0 records out
bash-3.00# du -sh /file1g
 500M   /file1g


Linux :

Mkfile command will not work, instead we use "dd" command  or /dev/urandom as below.


# head -c 1024m /dev/urandom > /fs1/file1g
# du -sh /fs1/file1g
1.1G    /fs1/file1g

# cat /dev/urandom /fs1/filename after some times, do ctrl+c to kill,

[OR]

# dd if=/dev/zero of=/fs1/file1g count=500 bs=2048k
500+0 records in
500+0 records out
1048576000 bytes (1.0 GB) copied, 26.3419 seconds, 39.8 MB/s
[root@linux1 admin]# du -sh /fs1/file1g
1001M   /fs1/file1g

How to Veiw Solaris System Configuration Information

Several tools are available to examine system configuration information. Some tools require superuser privilege. Other tools can be run by a non-privileged user. Every structure and data item can be examined with the kernel debugger by using mdb on a running system or by booting under kmdb.

The sysdef command provides the values of System V IPC settings, STREAMS tunables, process resource limits, and portions of the tune and v structures. For example, the sysdef “Tunable Parameters” section from on   Sun Fire 280R  with 2GB RAM as below

* Tunable Parameters
42082304        maximum memory allowed in buffer cache (bufhwm)
   30000        maximum number of processes (v.v_proc)
      99        maximum global priority in sys class (MAXCLSYSPRI)
   29995        maximum processes per user id (v.v_maxup)
      30        auto update time limit in seconds (NAUTOUP)
      25        page stealing low water mark (GPGSLO)
       1        fsflush run rate (FSFLUSHR)
      25        minimum resident memory for avoiding deadlock (MINARMEM)
      25        minimum swapable memory for avoiding deadlock (MINASMEM)
*