Hello,
I'm looking for a command or script that could permit me to know what is memory usage group by HP-UX kernel, oracle processes and other users (specific software).
A command like 'top' but for all processes and not only for 12 max could be very useful
Thanks in advance (4 Replies)
Hello,
I'm still learning unix and I have what is probably a simple question but I can't seem to find the question to. I have an Ultra 10 Sparc Server running solaris 8 and the drive may have crashed (I hope not). Currently, it appears some files in the /etc folder are missing. I have a backup... (1 Reply)
hi,
i'm trying to grant usage to multiple users whose ids are in a file. i thought that i could put the mysql code within a while loop, but that's not working for me:
while read user; do
userid=$user
passwd="changeme"
query="grant usage on mysql.USERS.* to $userid... (2 Replies)
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Hi!
Is there any way to balance CPU usage between users on percentage basis? Something like Resource Manager in Oracle databases.
Regards.
---------- Post updated at 02:17 PM ---------- Previous update was at 02:09 PM ----------
Workload Manager?
---------- Post updated at 03:44 PM... (0 Replies)
I was wondering if there was a way to set resource usage per user. For example, if I use "grep -f <file1> <file2>" and the two files are very big it consumes a lot of resources. Onetime someone pinged me and asked what the hell I was doing and to kill it. Is there any way an SA can restrict... (7 Replies)
Hey, I'm trying to make a script that can list users and their storage usage in a file. Im trying to get it to where the format is:
User xxkbs
User2 xkb
and so on. So far I figured out how to get the users, but I cannot figure out how to get the storage usage per user.
This is what... (2 Replies)
Hi,
i have a log file of 8 GB size , i need to grep the count of a word which i give as an input , i mean to say to find the occurance of a word on that file.
grep is taking too much time ,can you please give me any command so that i can grep the word in a quicker way..
thanks,
... (16 Replies)
Hi guys, i need a small help. I was writing an automation script for import utility of oracle datapump. I am getting stuck in one part of the shell script where i am doing a grep on one of the filesystem and if it is above threshold then it would kick off an oracle RMAN backup. Fyi. i am grepping... (3 Replies)
I would like to know how to capture the usage of CPU by each user. Is there a way to do this on AIX?
Gaya (0 Replies)
Discussion started by: ggayathri
0 Replies
LEARN ABOUT PHP
pg_fetch_array
PG_FETCH_ARRAY(3)PG_FETCH_ARRAY(3)pg_fetch_array - Fetch a row as an arraySYNOPSIS
array pg_fetch_array (resource $result, [int $row], [int $result_type = PGSQL_BOTH])
DESCRIPTION pg_fetch_array(3) returns an array that corresponds to the fetched row (record).
pg_fetch_array(3) is an extended version of pg_fetch_row(3). In addition to storing the data in the numeric indices (field number) to the
result array, it can also store the data using associative indices (field name). It stores both indicies by default.
Note
This function sets NULL fields to the PHP NULL value.
pg_fetch_array(3) is NOT significantly slower than using pg_fetch_row(3), and is significantly easier to use.
PARAMETERS
o $result
- PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others).
o $row
- Row number in result to fetch. Rows are numbered from 0 upwards. If omitted or NULL, the next row is fetched.
o $result_type
- An optional parameter that controls how the returned array is indexed. $result_type is a constant and can take the following
values: PGSQL_ASSOC, PGSQL_NUM and PGSQL_BOTH. Using PGSQL_NUM, pg_fetch_array(3) will return an array with numerical indices,
using PGSQL_ASSOC it will return only associative indices while PGSQL_BOTH, the default, will return both numerical and associa-
tive indices.
RETURN VALUES
An array indexed numerically (beginning with 0) or associatively (indexed by field name), or both. Each value in the array is represented
as a string. Database NULL values are returned as NULL.
FALSE is returned if $row exceeds the number of rows in the set, there are no more rows, or on any other error.
EXAMPLES
Example #1
pg_fetch_array(3) example
<?php
$conn = pg_pconnect("dbname=publisher");
if (!$conn) {
echo "An error occurred.
";
exit;
}
$result = pg_query($conn, "SELECT author, email FROM authors");
if (!$result) {
echo "An error occurred.
";
exit;
}
$arr = pg_fetch_array($result, 0, PGSQL_NUM);
echo $arr[0] . " <- Row 1 Author
";
echo $arr[1] . " <- Row 1 E-mail
";
// As of PHP 4.1.0, the row parameter is optional; NULL can be passed instead,
// to pass a result_type. Successive calls to pg_fetch_array will return the
// next row.
$arr = pg_fetch_array($result, NULL, PGSQL_ASSOC);
echo $arr["author"] . " <- Row 2 Author
";
echo $arr["email"] . " <- Row 2 E-mail
";
$arr = pg_fetch_array($result);
echo $arr["author"] . " <- Row 3 Author
";
echo $arr[1] . " <- Row 3 E-mail
";
?>
SEE ALSO pg_fetch_row(3), pg_fetch_object(3), pg_fetch_result(3).
PHP Documentation Group PG_FETCH_ARRAY(3)