Hot answers tagged

3

My advice is keep things simple. Don't write a whole script when there is a ready-made tool that already does what you want. du is the tool for reporting on disk usage, and find is the tool for finding files. Use them together. find dirname* -mindepth 1 -maxdepth 1 -type d -exec du -hs {} \; -maxdepth and -mindepth are GNU extensions; to handle this ...


2

Several ways to do that. You can simply use dd, like : dd if=/dev/zero of=/dev/null Or there are other tools like stress : stress --cpu 2 --timeout 60 The above will stress two cores for 60 seconds. Or you can also use an endless while loop : while true; do true; done Another possibility is this fork bomb - careful with this as it might even ...


2

As is often the case on Solaris, /usr/bin/egrep is a legacy implementation that isn't POSIX-compliant, while /usr/xpg4/bin/egrep is a POSIX-compliant implementation and has little if anything beyond POSIX. Unless you're running legacy Solaris applications from the pre-POSIX days, make sure that /usr/xpg4/bin is before /usr/bin in your $PATH. GNU tools ...


1

Solaris isn't fundamentally different from other *nix's. Moreover, looking at bash -t won't give you useful information in all cases. Have you tried last?


1

The physmem value from the system_pages statistics will give you the number of pages the OS sees. You need to multiply this number by the default page size which can be 4K or 8K depending on your architecture: $ kstat -n system_pages -p -s physmem | nawk -v pagesize=$(pagesize) '{print $2*pagesize/1024/1024 "MB"}' 4017.64MB Note that this might not ...


1

It's been a long time since I last used sendmail on Solaris but I'm sure its -v flag will show what's going on: ( echo 'From: me@example.net' echo 'To: you@contoso.com' echo 'Subject: from me to you' echo finger ) | sendmail -t -v I'm also pretty sure that mailx passes this flag onwards: echo hello, world | mailx -v -s "mail subject" ...


1

Depends upon which unix/linux you are using, you would need to install "curl" package. If it supports rpm, install curl rpm after downloading from any rpm repositories (e.g. http://rpmfusion.org/ ) or setup yum. If its debian based try getting debian based package using apt-get etc. Note: download and install only those packages which are compatible to ...


1

Start with the application logs (if available). Then check the system logs (ie. /var/adm/messages, /var/cron/log if launched by cron, /var/svc/log/ in case of service etc.). If the process is maintained by SMF, check svcs -xv and appropriate logs. Also have a look if coreadm is configured to create core dumps for crashing processes. Note that core dumps are ...



Only top voted, non community-wiki answers of a minimum length are eligible