|

Monday October 11, 2004
gcore
gcore is a very usefull utility for grabbing a core from a running process which has been enhanced further in Solaris 10. Adam Leventhal touched briefly off gcore in his blog posting on core file improvements, but didn't expand upon the new features and the fact that we now have content types (we will put it down to modesty, he did write the code).
Anyway very briefly, in Solaris 9 gcore had just one option, -o outfile, this has now been expanded to
# gcore
usage: gcore [ -pgF ] [ -o filename ] [ -c content ] pid ...
The -p and -g options are tied into coreadm(1M) settings, while the -c content is one of the content types listed in coreadm. Finally, as you probably guessed -F is force.
So a very quick example is in order I guess.....
[fintanr@tiresias fintanr] $ gcore `pgrep gnome-vfs`
gcore: core.887 dumped
[fintanr@tiresias fintanr] $ pstack core.887
core 'core.887' of 887: /usr/lib/gnome-vfs-daemon --oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_F
----------------- lwp# 1 / thread# 1 --------------------
ce3e24b5 pollsys (80e0230, 3, 8047028, 0)
ce389c88 poll (80e0230, 3, bb8) + 68
ce8931fe g_main_context_iterate () + 39d
----------------- lwp# 2 / thread# 2 --------------------
ce3e24b5 pollsys (80e1400, b, 0, 0)
ce389c88 poll (80e1400, b, ffffffff) + 68
ce8931fe g_main_context_iterate () + 39d
and just to show that gnome-vfs-daemon is still running
[fintanr@tiresias fintanr] $ ptree 887
887 /usr/lib/gnome-vfs-daemon --oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Fact
(2004-10-11 06:45:00.0)
Permalink
|