Disk Space full

I was tryin to copy a large file under /tmp location.

I guess the disk space got full and i got fork error.

Then I tried removing some files but the shell did not let me do anything

bash> rm apache22.tar
bash: fork: Not enough space
bash> pwd
/tmp
bash> vmstat 1
bash: fork: Not enough space

Somehow the unix SA fixed this. Do you know how to overcome this issue ?

Would this be a Solaris system?

If so, /tmp is not a filesystems on a disk, but instead is using memory. You effectively consumed all available free memory when you filled up /tmp, so there was no memory to man fork (linux) of a new processes. Your SA has sufficient privileges to use the reserved space to run commands: removing your files.

Take a look at man df (solaris) command.

You may want to consider using /var/tmp for these temporary files. Or talk to your SA and ask for space for your webserver.

You mean all that SA would have done is to fire the rm command which did not work for me ?

I was not able to fire any command including df at the time of the issue.

Yes, the /tmp has some swap memory.

This is a classic example of what happens when you run out of system resources like memory. The shell cannot create another process ( fork ) and thus you are restricted to the built-in commands provided by the shell you are using.

You copied the large file in /tmp which is tmpfs and resides on virtual memory. Dumping files in /tmp means consuming virtual memory. In turn, less room for other processes.

In this case, here is what you could do:

cd /tmp; echo *; >large_file

All of the commands are shell built-in (work in bourne and korn shells) and shell does not need to fork another process. So, cd lets you in the /tmp directory, echo lets you see the files in that and figure out the name of the file, > brings the size of the file down to zero solving your problem.