Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!gatech!hubcap From: hubcap@hubcap.clemson.edu (Mike Marshall) Newsgroups: comp.unix.ultrix Subject: Re: Hidden commands ? Message-ID: <6738@hubcap.clemson.edu> Date: 11 Oct 89 13:19:22 GMT References: <1501@riscy.dec.com> Organization: Clemson University, Clemson, SC Lines: 32 From article <1501@riscy.dec.com>, by graham@fuel.dec.com (kris graham): > Try.. > > dd if=/dev/mem of=/dev/null bs=1024 conv=noerror What a cool idea! It took forever on our 8810 with 114 meg though. t. patterson (tp@decwrl.dec.com) posted this a while back - it works in a flash: #!/bin/sh # show amount of memory on machine in kilobytes machine=vax [ -f /bin/machine ] && { machine=`/bin/machine` } x=`echo "&physmem/D ; quit " | dbx -k /vmunix /dev/mem | tail -1 |\ awk '{print $2}'` case "${machine}" in vax) # a little bit of round-off error will creep in... echo `expr $x / 2` " K" ;; mips) echo `expr $x \* 4` " K" ;; *) exit 1 ;; esac exit 0