Sponsored Content
Top Forums UNIX for Dummies Questions & Answers My output doesn't match anything...and the program is pretty simple Post 302238743 by Annihilannic on Sunday 21st of September 2008 08:49:48 PM
Old 09-21-2008
But that's what computers are for... to make us look stupid. Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

HELP ASAP.. pretty simple..

Hey guys.... couple questions... I am working a problem set and can't answer this: 1) Suppose you are in a directory that contains a file called "foo." You want to create a new file called "bar" that contains the sorted contents of "foo" in the parent directory of the one you're in. How... (8 Replies)
Discussion started by: ugakid
8 Replies

2. UNIX for Dummies Questions & Answers

echo $PATH doesn't match $HOME/.profile

This is on a Solaris 9 box, but I feel like a noob, so I am posting here. When I echo $PATH I get a lot of duplicate paths and extra stuff I don't need. What I want is just what I set up in my home dir under .profile My login shell=/bin/bash I checked the following and there are no path... (1 Reply)
Discussion started by: Veestan
1 Replies

3. Shell Programming and Scripting

OS differences in simple pattern match

Hi folksSorry if code tags don't work out correctly but this PC does not have Java setup correctly to allow me to put them inproperly.I have a simple string pattern match behaving differntly on AIX and Solaris 10 and I don't understand why or what to do about it.This simple test: -) ]] && echo... (4 Replies)
Discussion started by: steadyonabix
4 Replies

4. Shell Programming and Scripting

Simple regexp doesn't work

I'm pretty experienced with regexps, but I just can't get this expression to work. The first line of my test file is this: **** info Fri Jun 04 12:37:58 PDT 2010 stuff I'm piping this file into this: egrep '^****\s++*Fri Jun 04' This returns 0 lines. If I change the... (7 Replies)
Discussion started by: dkarr
7 Replies

5. Shell Programming and Scripting

Simple Pattern Match

Hello ! Experts, I saw a ton of postings here about Awk pattern matching and even after going through all of it, what I have concocted isnt working for me. Here is what I am after. I have a huge set of csv files and in the fifth column, I have text like this --- ANFD10239CS9 BCDD93948CS9... (5 Replies)
Discussion started by: PG3
5 Replies

6. Solaris

Error: svcs: Pattern 'pooladm.conf' doesn't match any instances

Hi, I got the following errors during zfs resource pool configuration. Please help. Thanks. # svcs *pool* svcs: Pattern 'pooladm.conf' doesn't match any instances STATE STIME FMRI # svcadm enable system/pools:default # svcs *pool* svcs: Pattern 'pooladm.conf' doesn't match any... (4 Replies)
Discussion started by: aixlover
4 Replies

7. Shell Programming and Scripting

Swap usage by top and free command doesn't match

Its rather confusing, the output of top command is below: The "swap" field of top is described by the manpage as: "The swapped out portion of a task's total virtual memory image." But the output of free command suggests something else and it does tally with the output of swapon... (3 Replies)
Discussion started by: proactiveaditya
3 Replies

8. Linux

Ssh key doesn't match

I'm loged on server A as user infa8. I want to login via ssh key on server B as user ussdsc. destination server (B) is a redHat 6.2. Permissions for ussdsc@B for home, ssh and authorized_keys: $ ls -ltr | grep ussdsc drwxr-xr-x. 29 ussdsc mobifon 4096 Feb 18 11:43 ussdsc $ getfacl... (8 Replies)
Discussion started by: black_fender
8 Replies

9. Shell Programming and Scripting

Sdiff doesn't try and compare to closest match

In the example below i would want the extensions to match. Is there any other utility or script to achieve this. Kindly help. Example: sdiff sourceFileNames targetFileNames 17021701P.blf | 17021901P.ibk 17021701P.chn | 17021901P.irk 17021701P.bmr | 17021901P.dyd 17021701P.dpf |... (7 Replies)
Discussion started by: jamilpasha
7 Replies

10. Red Hat

Can C program put message to IBM MQ remotely, if local server doesn't have MQ library?

Can somebody know if it is possible to connect to remote IBM MQ, if local server using C, but don't have MQ library? Thanks for contribution (0 Replies)
Discussion started by: digioleg54
0 Replies
SPROF(1)							 Linux User Manual							  SPROF(1)

NAME
sprof - read and display shared object profiling data SYNOPSIS
sprof [option]... shared-object-path [profile-data-path] DESCRIPTION
The sprof command displays a profiling summary for the shared object (shared library) specified as its first command-line argument. The profiling summary is created using previously generated profiling data in the (optional) second command-line argument. If the profiling data pathname is omitted, then sprof will attempt to deduce it using the soname of the shared object, looking for a file with the name <soname>.profile in the current directory. OPTIONS
The following command-line options specify the profile output to be produced: -c, --call-pairs Print a list of pairs of call paths for the interfaces exported by the shared object, along with the number of times each path is used. -p, --flat-profile Generate a flat profile of all of the functions in the monitored object, with counts and ticks. -q, --graph Generate a call graph. If none of the above options is specified, then the default behavior is to display a flat profile and a call graph. The following additional command-line options are available: -?, --help Display a summary of command-line options and arguments and exit. --usage Display a short usage message and exit. -V, --version Display the program version and exit. CONFORMING TO
The sprof command is a GNU extension, not present in POSIX.1. EXAMPLE
The following example demonstrates the use of sprof. The example consists of a main program that calls two functions in a shared object. First, the code of the main program: $ cat prog.c #include <stdlib.h> void x1(void); void x2(void); int main(int argc, char *argv[]) { x1(); x2(); exit(EXIT_SUCCESS); } The functions x1() and x2() are defined in the following source file that is used to construct the shared object: $ cat libdemo.c #include <unistd.h> void consumeCpu1(int lim) { int j; for (j = 0; j < lim; j++) getppid(); } void x1(void) { int j; for (j = 0; j < 100; j++) consumeCpu1(200000); } void consumeCpu2(int lim) { int j; for (j = 0; j < lim; j++) getppid(); } void x2(void) { int j; for (j = 0; j < 1000; j++) consumeCpu2(10000); } Now we construct the shared object with the real name libdemo.so.1.0.1, and the soname libdemo.so.1: $ cc -g -fPIC -shared -Wl,-soname,libdemo.so.1 -o libdemo.so.1.0.1 libdemo.c Then we construct symbolic links for the library soname and the library linker name: $ ln -sf libdemo.so.1.0.1 libdemo.so.1 $ ln -sf libdemo.so.1 libdemo.so Next, we compile the main program, linking it against the shared object, and then list the dynamic dependencies of the program: $ cc -g -o prog prog.c -L. -ldemo $ ldd prog linux-vdso.so.1 => (0x00007fff86d66000) libdemo.so.1 => not found libc.so.6 => /lib64/libc.so.6(0x00007fd4dc138000) /lib64/ld-linux-x86-64.so.2(0x00007fd4dc51f000) In order to get profiling information for the shared object, we define the environment variable LD_PROFILE with the soname of the library: $ export LD_PROFILE=libdemo.so.1 We then define the environment variable LD_PROFILE_OUTPUT with the pathname of the directory where profile output should be written, and create that directory if it does not exist already: $ export LD_PROFILE_OUTPUT=$(pwd)/prof_data $ mkdir -p $LD_PROFILE_OUTPUT LD_PROFILE causes profiling output to be appended to the output file if it already exists, so we ensure that there is no preexisting pro- filing data: $ rm -f $LD_PROFILE_OUTPUT/$LD_PROFILE.profile We then run the program to produce the profiling output, which is written to a file in the directory specified in LD_PROFILE_OUTPUT: $ LD_LIBRARY_PATH=. ./prog $ ls prof_data libdemo.so.1.profile We then use the sprof -p option to generate a flat profile with counts and ticks: $ sprof -p libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls us/call us/call name 60.00 0.06 0.06 100 600.00 consumeCpu1 40.00 0.10 0.04 1000 40.00 consumeCpu2 0.00 0.10 0.00 1 0.00 x1 0.00 0.10 0.00 1 0.00 x2 The sprof -q option generates a call graph: $ sprof -q libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile index % time self children called name 0.00 0.00 100/100 x1 [1] [0] 100.0 0.00 0.00 100 consumeCpu1 [0] ----------------------------------------------- 0.00 0.00 1/1 <UNKNOWN> [1] 0.0 0.00 0.00 1 x1 [1] 0.00 0.00 100/100 consumeCpu1 [0] ----------------------------------------------- 0.00 0.00 1000/1000 x2 [3] [2] 0.0 0.00 0.00 1000 consumeCpu2 [2] ----------------------------------------------- 0.00 0.00 1/1 <UNKNOWN> [3] 0.0 0.00 0.00 1 x2 [3] 0.00 0.00 1000/1000 consumeCpu2 [2] ----------------------------------------------- Above and below, the "<UNKNOWN>" strings represent identifiers that are outside of the profiled object (in this example, these are instances of main()). The sprof -c option generates a list of call pairs and the number of their occurrences: $ sprof -c libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile <UNKNOWN> x1 1 x1 consumeCpu1 100 <UNKNOWN> x2 1 x2 consumeCpu2 1000 SEE ALSO
gprof(1), ldd(1), ld.so(8) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. Linux 2017-09-15 SPROF(1)
All times are GMT -4. The time now is 06:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy