User abusing the mysql

Hi

Is there way to find out which user abusing mysql? Once in a while I
have user who runs a query which causes the mysql to take over about
45% of cpu and at the same time slow down mysql queries for the rest.

I am using RT 3.4.6 + Perl 5.8.6 + MySQL 4.0.24 on Solaris 10 + V20z
(4G / 2 1.8Ghz AMD Opteron)

I think all the tables are InnoDB type

Here is the innodb part of my conf file

innodb_data_home_dir = /export/home/ibdata
innodb_data_file_path = ibdata1:2000M;ibdata2:50M:autoextend
innodb_log_group_home_dir = /export/home/ibdata
innodb_log_arch_dir = /export/home/ibdata
innodb_log_files_in_group = 2
innodb_buffer_pool_size = 1G
innodb_additional_mem_pool_size = 20M
innodb_log_file_size = 250M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
“…there are two kinds of people: those who work and those who take the credit…try
to be in the first group;…less competition there.” - Indira Gandhi

Hi,

How do I create new users using command line interface (CLI)?

The book says that the command is

rt create -t user …

and then I should type options. What exactly is the syntax? Can anyone
post an example?

I need to create a user and specify (at minumum):
userid
password
email
Name

a new user should be given right to read all tickets, create tickets.

Tomasz Wlodek | tel 631-344-7448
Brookhaven Laboratory, Building 510M | fax 631-344-7616
Upton NY 11973-5000 |

Hi

Is there way to find out which user abusing mysql? Once in a while I
have user who runs a query which causes the mysql to take over about
45% of cpu and at the same time slow down mysql queries for the rest.

You can enable logging of slow queries and use mytop.

Regards,
Harald

harald wagener
technischer leiter

fcb wilkens
an der alster 42
20099 hamburg
germany

t. +49 (0)40 2881-1252
f. +49 (0)40 2881-1217
m. +49 (0)172 4030-964
hwagener@hamburg.fcb.com
http://www.footeconebelding.de

rt> create -t user -oOn 5/3/06, Tomasz Wlodek tomw@bnl.gov wrote:

Hi,

How do I create new users using command line interface (CLI)?

The book says that the command is

rt create -t user …

and then I should type options. What exactly is the syntax? Can anyone
post an example?

I need to create a user and specify (at minumum):
userid
password
email
Name

a new user should be given right to read all tickets, create tickets.

Tomasz Wlodek | tel 631-344-7448
Brookhaven Laboratory, Building 510M | fax 631-344-7616
Upton NY 11973-5000 |


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

We’re hiring! Come hack Perl for Best Practical: Careers — Best Practical Solutions

Best regards, Ruslan.

Hello everybody,

I would like to modify the Correspindence Template and Admin
Correspondence so that it contains some information about who the
requestor of the ticket was.

I have added the following line to template:

Original requestor address {$Ticket->RequestorAddresses}

And it shows now in text of e-mails the e-mail of ticket requestor.
Great.

But Now I would like to see requestors real name. How do I do this?

This must be a very simple, some line

Requestor name - {$Ticket->…}

where instead of … I give the field name which corresponds to requestor
real name. What exactly is this field?

I can’t find description in the book, nor on the wiki.

Tomasz Wlodek | tel 631-344-7448
Brookhaven Laboratory, Building 510M | fax 631-344-7616
Upton NY 11973-5000 |

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomasz Wlodek wrote:

But Now I would like to see requestors real name. How do I do this?

This must be a very simple, some line

Requestor name - {$Ticket->…}

Requestor name - {$Ticket->Requestors->UsersObj->First->RealName}

If there is more than one requestor, you’ll need to write a routine to
go through them, probably using the $Ticket->Requestors->UsersObj->Next
method in a loop.

I can’t find description in the book, nor on the wiki.

It would be nice (HINT HINT) if RT Essentials included a reference list
of the common object methods, the objects to which they apply, and a
simple example of each one in use :slight_smile:

Sure, an exhaustive list would require a hundred pages, but you could
hit 90% of the objects and methods that somebody is likely to use in a
couple of dozen pages.

Rick R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEf1ROXIxWysfLtmkRAlrMAJ4wZRpuknciGKRq1cMpYoL/FgNmDwCfUEQo
0GdCXSpb81Jzz5UmYh2Bulc=
=66k1
-----END PGP SIGNATURE-----

Rick Russell wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomasz Wlodek wrote:

But Now I would like to see requestors real name. How do I do this?

This must be a very simple, some line

Requestor name - {$Ticket->…}

Requestor name - {$Ticket->Requestors->UsersObj->First->RealName}

If there is more than one requestor, you’ll need to write a routine to
go through them, probably using the $Ticket->Requestors->UsersObj->Next
method in a loop.

I can’t find description in the book, nor on the wiki.

It would be nice (HINT HINT) if RT Essentials included a reference list
of the common object methods, the objects to which they apply, and a
simple example of each one in use :slight_smile:

Sure, an exhaustive list would require a hundred pages, but you could
hit 90% of the objects and methods that somebody is likely to use in a
couple of dozen pages.

Rick R.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEf1ROXIxWysfLtmkRAlrMAJ4wZRpuknciGKRq1cMpYoL/FgNmDwCfUEQo
0GdCXSpb81Jzz5UmYh2Bulc=
=66k1
-----END PGP SIGNATURE-----


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

We’re hiring! Come hack Perl for Best Practical: Careers — Best Practical Solutions

HERE! HERE!

Hi,

I know that this is RT mailing list, not AT, but since AT www site is
down, and since many of RT users use AT, I thought some of you may be able
to help me.

I want to run a perl script which will loop over assets and print all
custom fields values for each asset.

This is a super trivial problem for an expert, just a few lines of Perl, I
know. But if you are not an expert you would like to see and example how
this is done, to get you started.

Could anyone help me with that?

Tom

off the top of my head:

my $AssObj = RTx::AssetTracker::Asset->new(RT->SystemUser);
$AssObj->Load($AssId);
my $AssCFs=$AssObj->CustomFields();
while(my $AssCF = $AssCFs->Next()) {
print $AssCF->Name, “: “;
my $AssValues=$AssObj->CustomFieldValues($AssCF->id);
while($AssValues and my $assvalue = $AssValues->Next) {
print $AssValue->Content,”\t”;
}
print “\n”;
}

Sorry for being such an Ass.

LOL… TGIF, folks. :)On Fri, 2007-02-23 at 17:16 -0500, Tomasz Wlodek wrote:

Hi,

I know that this is RT mailing list, not AT, but since AT www site is
down, and since many of RT users use AT, I thought some of you may be able
to help me.

I want to run a perl script which will loop over assets and print all
custom fields values for each asset.

This is a super trivial problem for an expert, just a few lines of Perl, I
know. But if you are not an expert you would like to see and example how
this is done, to get you started.

Could anyone help me with that?

Tom


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

This is an AT question, but it touches RT as well, since the same problem,
how to read links between tickets, exists in RT.

It is a very, very, very easy problem for an expert (at least I think so),
but for a non expert like me it is baffling. I am struggling with it for
some time.

Let us suppose that I have an AT asset object $Asset. I want to find
another assed, let us call it $NewAsset which is connected to $Asset by
one of the links (RunsOn, ComponentOf, DependsOn,… and so on, what you
see on link page in AT asset).

My intuition, common sense and past experience suggests that the code
should look like this (in general):

$Asset = … # read the AT asset information
$Links = $Asset->RunsOn; # links to objects on which Asset runs
for (my $Link=$Links->Next){ # loop over the links
$NewAsset=$Link->Target; # asset to which the $Link points to
}

So much my intuition how I THINK it SHOULD be. In reality it does not
work this way.

$Asset object does have methods like Links, RunsOn, IsRunning, ComponentOf
and so on, but the meaning of those fields puzzless me. for example when I
run

$Links = $Asset->RunsOn;
while ( my ($key, $value) = each(%$Links) ) {
print “\t $key => $value \n”;
}

I get:

 _open_parens => HASH(0x9e435fc)
 alias_count => 0
 order_by => ARRAY(0x9e7b164)
 where_clause =>
 table => Links
 tables =>
 is_limited => 1
 order =>
 user => RT::CurrentUser=HASH(0x9d95b60)
 limit_clause =>
 DBIxHandle => RT::Handle=HASH(0x9b2bd3c)
 restrictions => HASH(0x9e7ba80)
 primary_key => id
 auxillary_tables =>
 must_redo_search => 1
 itemscount => 0
 show_rows => 0
 aliases => ARRAY(0x9e7ba44)
 first_row => 0

Hell, what does it mean?

How do I translate it into target Asset?

Did anyone deal with similar problem?

How to decode link information in AT?

What is the real meaning of fields like “Links,RunsOn,IsRunning,…” in
Asset objects in AT?

Tom Wlodek

Hi

Anyone had any suggestions on this?
My problem is very similar, and as Tomasz mentions, it’s not really an AT issue but more of a query issue.

I have the following assettypes or queues:
customers, servers and software versions

They are linked together like this:
customers (referred to by) servers (is running) software versions

But I can’t figure out how to create a proper query that’ll show me the values of linked assets. In a pseoudo sql query, it’ll look something like this:

SELECT customers.name, servers., softwareversions. FROM softwareversion INNER JOIN bla bla bla WHERE softwareversion.build=1234

Hope someone can help out.
Thanks in advance.

Best regards
Tommy Abrahamsson

Is there an rpm installation of rt 3.6.* for RHEL4?

On the Best Practical page I see rpm for 3.4.* only.

Tom Wlodek