Sponsored Content
Top Forums Programming finding stack location in C using program Post 302093654 by jacques83 on Saturday 21st of October 2006 06:24:04 PM
Old 10-21-2006
Hi,

But in my case, I am getting a list of around a couple of thousand or nore addresses, and then an eventual segmentation fault. I am running my program on linux. Isnt this a possible way? I am not allowed to use any system command, and am supposed to report my findings obtained empirically. Please comment...
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

get stack trace from C program on Solaris 8

I'm on solaris 8. I need to check the stack trace inside my C program. I don't have printstack or walkstack. I tested getcontext and it works. But how do I get the symbols from "stack_t" ? Help please. Many thanks! (4 Replies)
Discussion started by: rydahl
4 Replies

2. UNIX for Dummies Questions & Answers

Finding files in subdirectories from one location

Using ssh, is there a simple command to find files in subdirectories from, let's say, the home directory on a shared server? (2 Replies)
Discussion started by: endl
2 Replies

3. Programming

access variable through program stack

I am working on garbage collector in C? How should :confused: I find the part of heap where the variable are stored. It there any compiler (GCC) support for this. (2 Replies)
Discussion started by: amit gangarade
2 Replies

4. Shell Programming and Scripting

Finding a word at specific location in a string

Hi All , I have different strings (SQL queries infact) of different lengths such as: 1. "SELECT XYZ FROM ABC WHERE ABC.DEF='123' " 2. "DELETE FROM ABC WHERE ABC.DEF='567'" 3. "SELECT * FROM ABC" I need to find out the word coming after the... (1 Reply)
Discussion started by: swapnil.nawale
1 Replies

5. UNIX for Advanced & Expert Users

Finding register set being used in program

How can i find( or list) contents of all registers being used by my program? Is there any system call or library available for this?:confused: At runtime in my c/c++ program. At runtime using may be some assembly hack!!!!!!!!!!! (2 Replies)
Discussion started by: amit gangarade
2 Replies

6. UNIX for Dummies Questions & Answers

finding my location in a string

I'm a relative newbie and apologize if this is silly... Suppose I have a file with English words and their Spanish translations. I read them in like this: while(getline < myfile > 0) { eng = $1 SPAN = $2 } Now, for every eng in SPAN, I want to scan through SPAN and search for a... (2 Replies)
Discussion started by: DrLeeDetroit
2 Replies

7. Programming

Finding the path of the C program

Hi All, I have a c program called findPath.c in a path /home/harsh/c-Programs/. How can i find the path where the program is stored at runtime?? I have given the following #include<stdio.h> int main() { system("dirname $0"); return 0; } This is resulting in the output as . <single dot... (6 Replies)
Discussion started by: sreeharshasn
6 Replies

8. UNIX for Dummies Questions & Answers

program location

Hello all, one of application on system requires that "uname" program is in "/usr/uname" location. I can find uname in "/usr/bin/uname" location. Is it possible to present the /usr/bin/uname as that it was located in /usr/uname location? Thank you in advanced, M (1 Reply)
Discussion started by: kreno
1 Replies

9. Programming

How to read max stack size -Xss that is set/default for a java program?

I need to know what is the maximum stack size i.e. -Xss my java program is running with. Is there a way to find that out from inside my java program code and outside of it. What i am looking for is to read whatever the current set max limit -Xss (stack sie) is for a particular JVM(not... (3 Replies)
Discussion started by: mohtashims
3 Replies

10. UNIX Desktop Questions & Answers

Knowing the size and location of variables in a C program

So I need some help with this. Pardon me if I'm posting in the wrong forum, after some googling for my answer and finding nothing I found this forum. It seemed appropriate for what I was seeking. I just didnt find a forum that concerned the use of GDB. I'm learning to use the C language and GDB.... (2 Replies)
Discussion started by: Cambria
2 Replies
fmstat(1M)                                                System Administration Commands                                                fmstat(1M)

NAME
fmstat - report fault management module statistics SYNOPSIS
fmstat [-asz] [-m module] [interval [count]] DESCRIPTION
The fmstat utility can be used by administrators and service personnel to report statistics associated with the Solaris Fault Manager, fmd(1M) and its associated set of modules. The Fault Manager runs in the background on each Solaris system. It receives telemetry informa- tion relating to problems detected by the system software, diagnoses these problems, and initiates proactive self-healing activities such as disabling faulty components. You can use fmstat to view statistics for diagnosis engines and agents that are currently participating in fault management. The documenta- tion for fmd(1M), fmadm(1M), and fmdump(1M) describes more about tools to observe fault management activities. If the -m option is present, fmstat reports any statistics kept by the specified fault management module. The module list can be obtained using fmadm config. If the -m option is not present, fmstat reports the following statistics for each of its client modules: module The name of the fault management module, as reported by fmadm config. ev_recv The number of telemetry events received by the module. ev_acpt The number of events accepted by the module as relevant to a diagnosis. wait The average number of telemetry events waiting to be examined by the module. svc_t The average service time for telemetry events received by the module, in milliseconds. %w The percentage of time that there were telemetry events waiting to be examined by the module. %b The percentage of time that the module was busy processing telemetry events. open The number of active cases (open problem investigations) owned by the module. solve The total number of cases solved by this module since it was loaded. memsz The amount of dynamic memory currently allocated by this module. bufsz The amount of persistent buffer space currently allocated by this module. The fmstat utility requires the user to posses the SYS_CONFIG privilege. Refer to the System Administration Guide: Security Services for more information about how to configure Solaris privileges. OPTIONS
The following options are supported: -a Print all statistics for a module, including those kept on its behalf by fmd. If the -a option is not present, only those statistics kept by the module are reported. If the -a option is used without the -m module, a set of global statistics associated with fmd are displayed. -m module Print a report on the statistics associated with the specified fault management module, instead of the default statistics report. Modules can publish an arbitrary set of statistics to help Sun service the fault management software itself. The module statistics constitute a Private interface. See attributes(5) for information on Sun's rules for Private interfaces. Scripts should not be written that depend upon the values of fault management module statistics as they can change without notice. -s Print a report on Soft Error Rate Discrimination (SERD) engines associated with the module instead of the default module statistics report. A SERD engine is a construct used by fault management software to determine if a statistical threshold measured as N events in some time T has been exceeded. The -s option can only be used in combination with the -m option. -z Omit statistics with a zero value from the report associated with the specified fault management module. The -z option can only be used in combination with the -m option. OPERANDS
The following operands are supported: count Print only count reports, and then exit. interval Print a new report every interval seconds. If no interval and no count are specified, a single report is printed and fmstat exits. If an interval is specified but no count is speci- fied, fmstat prints reports every interval seconds indefinitely until the command is interrupted. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 A fatal error occurred. A fatal error could be the failure to communicate with fmd(1M). It could also be that insufficient privi- leges were available to perform the requested operation. 2 Invalid command-line options were specified. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWfmd | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ The command-line options are Evolving. The human-readable default report is Unstable. The human-readable module report is Private. SEE ALSO
fmadm(1M), fmd(1M), fmdump(1M), attributes(5) System Administration Guide: Security Services SunOS 5.10 8 Mar 2004 fmstat(1M)
All times are GMT -4. The time now is 08:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy