- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Looking for c program that summarizes core dump fi...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 07:11 AM
04-16-2003 07:11 AM
I want to avoid running strings or interactively examining the file.
jack...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 07:15 AM
04-16-2003 07:15 AM
Re: Looking for c program that summarizes core dump files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 07:18 AM
04-16-2003 07:18 AM
Re: Looking for c program that summarizes core dump files
strings core gives a lot of garbage and sometimes a single usefull information.
What you're looking for is:
what core
file core
Mayby somebody knows more useful commands?
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 07:18 AM
04-16-2003 07:18 AM
Re: Looking for c program that summarizes core dump files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 07:23 AM
04-16-2003 07:23 AM
Re: Looking for c program that summarizes core dump files
You are more than welcome.
Best wishes from London - and for our USA forumers that is England.
;^)
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2003 08:13 AM
04-16-2003 08:13 AM
SolutionI agree with you, Paula's answer is great (of course the others too). You could also check the following, it was posted today. Here you will find a program posted by Paddy. I don't know if it will help you but take a look:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8a1e9607df6ed711abdc0090277a778c,00.html
Regards,
DR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 06:08 AM
04-17-2003 06:08 AM
Re: Looking for c program that summarizes core dump files
---------------------------------
#include
#include
#include
#include
#include
struct corehead chead;
struct proc_exec pexec;
struct proc_info pinfo;
char *signames[] = {
"", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "IOT", "EMT", "FPE",
"KILL", "SEGV", "SYS", "PIPE", "ALRM", "TERM", "USR1", "USR2", "CHLD",
"CLD", "PWR", "VTALRM", "PROF", "IO", "POLL", "WINCH", "STOP", "TSTP",
"CONT", "TTIN", "TTOU", "URG", "LOST", "" "DIL"
};
char dummy[BUFSIZ];
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) < (b) ? (a) : (b))
main(argc, argv)
int argc;
char **argv;
{
char *file;
int fd;
int len;
if (argc < 2)
file = "core";
else
file = argv[1];
if ((fd = open(file, O_RDONLY)) < 0) {
fprintf(stderr, "Cant't open core file.\n");
fprintf(stderr, "Usage: core [core_file]\n");
exit(1);
}
while(read(fd, &chead, sizeof(struct corehead))) {
switch(chead.type) {
case CORE_DATA:
len = chead.len;
printf("Core data length: %d\n", len);
while (len > 0) {
read(fd, dummy, min(len, BUFSIZ));
len -= min(len, BUFSIZ);
}
break;
case CORE_EXEC:
read(fd, &pexec, sizeof(struct proc_exec));
printf("Command: %s\n", pexec.cmd);
break;
case CORE_FORMAT:
read(fd, &len, sizeof(int));
printf("Format version: %d\n", len);
break;
case CORE_KERNEL:
read(fd, dummy, chead.len);
printf("Kernel: %s\n", dummy);
break;
case CORE_PROC:
len = chead.len;
read(fd, &pinfo, sizeof(struct proc_info));
printf("Died from signal %d (SIG%s), type %d\n",
pinfo.sig, signames[pinfo.sig], pinfo.trap_type);
break;
case CORE_STACK:
len = chead.len;
printf("Core stack length: %d\n", len);
while (len > 0) {
read(fd, dummy, min(len, BUFSIZ));
len -= min(len, BUFSIZ);
}
break;
default:
fprintf(stderr, "Unknown data object in core file!\n");
fprintf(stderr,
"Type = %d, Space = %d, Addr = %d, Length = %d\n",
chead.type, chead.space, chead.addr, chead.len);
exit(1);
}
} exit(0);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 06:19 AM
04-17-2003 06:19 AM
Re: Looking for c program that summarizes core dump files
thankx
jack
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 06:27 AM
04-17-2003 06:27 AM
Re: Looking for c program that summarizes core dump files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 06:27 AM
04-17-2003 06:27 AM
Re: Looking for c program that summarizes core dump files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 10:28 AM
04-17-2003 10:28 AM
Re: Looking for c program that summarizes core dump files
jack...