I need help in awk please help immediatly.
This below function is taking lot of time
Please help me to fine tune it so that it runs faster.
The file count is around 3million records
# Process Body
processbody() {
#set -x
while read line
do
... (18 Replies)
using the internal 2 drives mirror was created using raidctl on 100's of our servers . sometime when one drive fails we dont face any issue & we replace the drive with out any problem . but sometimes when one drive fails , system becomes unresponsive and doesnot allow us to login , the only way to... (1 Reply)
Hi All,
I'm facing an issue in my awk script.
The script is processing a large text file having the details of a number of persons, each person's details being written from 100 to 250 tags as given below:
100 START|
101klklk|
...
245 opr|
246 55|
250 END|
100 START|
...
245 pp|
246... (4 Replies)
Hi,
I have written a program in C and have to test the return value of the functions. So the normal way of doin this wud b
int rc
rc=myfunction(input);
if(rc=TRUE){
}
else{
}
But instead of doing this I have called the function in the if() condition. Does this have any... (2 Replies)
Hi all,
I decided to replace my linux router/firewall with Solaris 11 express. This is a pppoe connection directly to my server...no router boxes. I got everything setup, but the performance is terrible on the NAT....really slow. A web page that loads on the server instantly will take... (3 Replies)
Hi,
We have GPFS 3.4 Installed on two AIX 6.1 Nodes. We have 3 GPFS Mount points:
/abc01 4TB (Comprises of 14 x 300GB disks from XIV SAN)
/abc02 4TB (Comprises of 14 x 300GB disks from XIV SAN)
/abc03 1TB ((Comprises of Multiple 300GB disks from XIV SAN)
Now these 40... (1 Reply)
I 'm trying to clone a zfs file system pool/u01 to a new file system called newpool/u01 using following commands
zfs list
zfs snapshot pool/u01@new
zfs send pool/u01@new | zfs -F receive newpool/u01
Its a 100G file system snapshot and copied to same server on different pool and... (9 Replies)
Good Day Everyone,
Just wonder anyone has encounter AIX 6.1 Memory Performance issues ? What I have in my current scenario is we have 3 datastage servers (Segregate server and EE jobs - for those who know Datastage achitect) and 2 db servers(running HA to load balance 4 nodes partitions for... (3 Replies)
hi guys
right now I have 6 Virtual Machines (VMs) running on Vmware ESXi 5.1 and attached to Storage SAN.
All these run Suse Linux 11 SP1 x64.
All of a sudden 1 of these VMs is running very slow making high CPU usage and I see al wait % kinda high 40-50%. Apparently since I don't own this... (5 Replies)
For years we blocked Baiduspider due to the fact their bots do not obey the robots.txt directive and can really hurt site performance when they unleash 100 bots on the site each pulling pages many times per second.
Last year, I unblocked Baiduspider's IP addresses, and now the problem is back.
... (1 Reply)
Discussion started by: Neo
1 Replies
LEARN ABOUT SUNOS
getcwd
getcwd(3C) Standard C Library Functions getcwd(3C)NAME
getcwd - get pathname of current working directory
SYNOPSIS
#include <unistd.h>
char *getcwd(char *buf, size_t size);
DESCRIPTION
The getcwd() function places an absolute pathname of the current working directory in the array pointed to by buf, and returns buf. The
pathname copied to the array contains no components that are symbolic links. The size argument is the size in bytes of the character array
pointed to by buf and must be at least one greater than the length of the pathname to be returned.
If buf is not a null pointer, the pathname is stored in the space pointed to by buf.
If buf is a null pointer, getcwd() obtains size bytes of space using malloc(3C). The pointer returned by getcwd() can be used as the argu-
ment in a subsequent call to free().
RETURN VALUES
Upon successful completion, getcwd() returns the buf argument. Otherwise, the function returns a null pointer and sets errno to indicate
the error.
ERRORS
The getcwd() function will fail if:
EINVAL The size argument is equal to 0.
ERANGE The size argument is greater than 0 and less than the length of the pathname plus 1.
The getcwd() function may fail if:
EACCES A parent directory cannot be read to get its name.
ENOMEM Insufficient storage space is available.
EXAMPLES
Example 1: Determine the absolute pathname of the current working directory.
The following example returns a pointer to an array that holds the absolute pathname of the current working directory. The pointer is
returned in the ptr variable, which points to the buf array where the pathname is stored.
#include <stdlib.h>
#include <unistd.h>
...
long size;
char *buf;
char *ptr;
size = pathconf(".", _PC_PATH_MAX);
if ((buf = (char *)malloc((size_t)size)) != NULL)
ptr = getcwd(buf, (size_t)size);
...
USAGE
Applications should exercise care when using chdir(2) in conjunction with getcwd(). The current working directory is global to all threads
within a process. If more than one thread calls chdir() to change the working directory, a subsequent call to getcwd() could produce unex-
pected results.
EXAMPLES
Example 2: Printing the current working directory
The following example prints the current working directory.
#include <unistd.h>
#include <stdio.h>
main()
{
char *cwd;
if ((cwd = getcwd(NULL, 64)) == NULL) {
perror("pwd");
exit(2);
}
(void)printf("%s
", cwd);
free(cwd); /* free memory allocated by getcwd() */
return(0);
}
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO chdir(2), malloc(3C), attributes(5), standards(5)SunOS 5.10 18 Oct 2004 getcwd(3C)