w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Perf output cannot be redirected to file
I also use Ubuntu 12.04, it may depends on your version of perf. The Perf verision of mine is 3.2.40. (You can check it by: perf --version Since mine is above version 3.x, I have tried following commands, which works for me: 3>results.log perf stat -e cycles --log-fd 3 ls > ls.txt So according to your case, you could try: 3>hhe.txt perf stat -e minor-faults,major-faults,cs -p 14615 --log-fd 3 ls > ls.txt Meanwhile, I found this post very useful: What stream does perf use? http://unix.stackexchange.com/questions/89591/what-stream-does-perf-use Hope this helps : )

Categories : Linux

Open perf.data in Kcachegrind
There are two approaches for conversion of perf data to callgrind format, but its unclear which of them is more mature. The one with more current commits called perfgrind can be found at https://github.com/ostash/perfgrind However, it is stated to lack callgraph support, and commits came to a halt after announcement of a patch for the 2nd tool on the kernel mailing list, see lkml.org/lkml/2013/3/27/535. The 2nd tool https://github.com/vitillo/perf approaches direct integration into the perf command, but has not yet seen an official release. At least the perf 3.10.0 I tried does not support the proposed 'perf convert' syntax.

Categories : Linux

Perf annotate, display only source code
Unfortunately perf-annotate uses objdump under the hood which doesn't seem to be able to show only source (-S implies -d). If you know the way to make objdump behave, see symbol__annotate() at tools/perf/util/annotate.c. snprintf(command, sizeof(command), "%s %s%s --start-address=0x%016" PRIx64 " --stop-address=0x%016" PRIx64 " -d %s %s -C %s|grep -v %s|expand", objdump_path ? objdump_path : "objdump", disassembler_style ? "-M " : "", disassembler_style ? disassembler_style : "", map__rip_2objdump(map, sym->start), map__rip_2objdump(map, sym->end+1), symbol_conf.annotate_asm_raw ? "" : "--no-show-raw", symbol_conf.annotate_src ? "-S" : "", symfs_filename, filename);

Categories : Linux

Does perf lock profile user space mutexes?
Summary: Does perf lock profile pthread_mutex? Summary: no, because there are no any tracepoint defined in user-space pthread_mutex. According to source file tools/perf/builtin-lock.c (http://lxr.free-electrons.com/source/tools/perf/builtin-lock.c#L939) cmd_lock calls __cmd_record, which defines several tracepoints for perf record (via -e TRACEPOINT_NAME) and also pass options -R -m 1024 -c 1 to perf report. List of tracepoints defined: lock_tracepoints: 842 static const struct perf_evsel_str_handler lock_tracepoints[] = { 843 { "lock:lock_acquire", perf_evsel__process_lock_acquire, }, /* CONFIG_LOCKDEP */ 844 { "lock:lock_acquired", perf_evsel__process_lock_acquired, }, /* CONFIG_LOCKDEP, CONFIG_LOCK_STAT */ 845 { "lock:lock_contended", perf_evsel__pr

Categories : Linux

How to catch the L3-cache hits and misses by perf tool in Linux
That is strange LLC (Last Level Cache) is configured with "L2" if the hardware has L3 cache. But I don't know yet internals of perf and maybe these settings are generic. I think the only solution you have is to use "raw hardware event" (see at the end of "perf list", the line starting with "rNNN"). That gives the opportunity to encode a description of the hardware registers. The perf user guide and tutorial only mention "To measure an actual PMU as provided by the HW vendor documentation, pass the hexadecimal parameter code". I don't know what is the syntax on Intel and if there is different implementations of the performance monitor on this architecture. You could start here: http://code.google.com/p/kernel/wiki/PerfUserGuide#Hardware_events

Categories : Linux

Libraries for inprocess perf profiling? (Intel performance counters on Linux)
I've used both PAPI (on Solaris) and perf (on Linux) and found it is much easier to record the entire program run and use 'perf-annotate' to see how your critical path is doing rather than trying to measure only the critical path. It's a different approach but it worked well for me. Also, as someone mentioned at the comments, there is vTune, if you are x86 based. I've never used it myself.

Categories : Linux

jenkins: performance plugin shows only recent build data in the perf report
Apparently the solution is very simple. Found it myself! By default all jtl files had a timestamp at the beginning, thanks to jmeter-maven-plugin. Pattern was yyyyMMdd. Trend report in jenkins displayed last build results. And because of the pattern jtl results for all builds run this day were the same, and were different for previous day. So, easiest solution was to remove that timestamp from the results file name. <testResultsTimestamp>false</testResultsTimestamp> in configuration part of jmeter-maven-plugin in the pom file. Annoying, is that Performance plugin guys haven't put it into the documentation, - the requirement for results file to have the same name in order to be displayed on the graph...

Categories : Jenkins

Linux skip /root/.gvfs when executing df command with non-root user
I got the solution for my own question :) In df command you can pass the file system types which you would like to exclude, in this case it is 'fuse.gvfs-fuse-daemon'. So when I execute the below the command I no more get this message "df: `/root/.gvfs': Permission denied" df -x fuse.gvfs-fuse-daemon For more details one can look into df --help option.

Categories : Linux

Is sudo-ing tomcat's startup with a non-root user the same as running it as root?
Do be aware that the recommended solution to run tomcat on port 80 is to use mod-jk with the Apache web server, not to have tomcat listen on port 80 directly.

Categories : Unix

Root immediate child nodes icons not visible when hiding root
JTree#setShowsRootHandles(boolean newValue) controls the state of the handles for root elements. Normally, this is false. Try changing to true

Categories : Java

Read and Write root folder wihout root
You can use run-as on some devices to execute commands as a particular package. Google have fixed this on Jelly Bean so it no longer works: adb shell run-as app.package.name cp /data/data/package.name/file.txt /sdcard/ exit adb pull /sdcard/file.txt ~/ Here is a good article explaining file access in Android without root permissions, including a one-liner for the above script. It details how to use the new backup command: backup -f ~/data.ab -noapk app.package.name And how to extract the contents of the resulting .ab file: dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf - You will most likely need the android.permission.BACKUP permission.

Categories : Android

Reset MAMP Pro username and password to root/root
Assuming you still know the password, you can change the password back to root using /Applications/MAMP/Library/bin/mysqladmin -u root -p password root It'll prompt you to enter a password again, after which it'll be reset to root

Categories : Mysql

Same permissions, different rights?
The Apache server is installed within a Linux distribution with SELinux enabled. SELinux by default denies Apache to read files in /home folders. By using ls -Z one can check SELinux labels of files. In my case, while usual (DAC) permissions were the same and there were no ACLs set, SELinux context was different: Next one is readable from Apache daemon and scripts: unconfined_u:object_r:httpd_sys_content_t: Next one is the file that SELinux denies access to Apache: unconfined_u:object_r:user_home_t

Categories : Python

SVN (svnserve) virtual root --root= not recognized
svn+ssh handles the whole transaction including writing and reading the files so it ignores the --root parameter in svnserve. Here is how to fix it over at serverfault -- Basically you just make svnserve into a script that calls svnserve with the proper variables.

Categories : Svn

Folders tree with rights
On OS X you can install tree, using homebrew: brew install tree or, using macports: sudo port install tree and then, to view directories with permissions: $ tree -p -d Sample output: . ├── [drwxr-xr-x] folder1 │   └── [drwxr-xr-x] folder2 │   └── [drwxr-xr-x] folder3 │   └── [drwxr-xr-x] folder4 └── [drwxr-xr-x] folder5 ├── [drwxr-xr-x] folder6 └── [drwxr-xr-x] folder7

Categories : Osx

FileNet Api access rights for asp.net
When you're running the application through a console, the user you are logged in as is used i.e. this is you and you probably have admin rights on the machine. When you run it through IIS, this will depend on which version of IIS you are using. Look at this question for more information. You'll either need to change which user the web site is running under or grant further permissions to the user (or group) that is currently configured.

Categories : C#

ACL Error when assigning AD Rights
According to the error "Some or all identity references could not be translated.", it looks like the user with such still not exist in the Directory (or in the Directory the computer is connected to) when you try to use it. I would try to first look for the user in the directory before trying to use it. Check the value of $Account before using it.

Categories : Powershell

downgrade rights of a started process
This seems to be have discussed before, check this out: How do you de-elevate privileges for a child process Looks like an UAC elevation is strictly one-way, so the solutions are a bit gnarly, i.e. code injection into explorer and stuff like that. http://www.codeproject.com/Articles/18946/High-elevation-can-be-bad-for-your-application-How

Categories : C#

Administrator rights for Windows application
If you want your application to always run as administrator, you can specify this in your application's manifest file. Specifically, you will need to add something like this: <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> More on application manifest files can be found in MSDN.

Categories : C++

Start on logon with admin rights
Schtasks /Create /TN admin /RU SYSTEM /SC ONLOGON /TR C:adminadmin.bat is approaching the best that can be done for the scheduled task itself. It is possible that running the task as a user administrator instead of SYSTEM will display the UI, like so: Schtasks /Create /TN admin /RU "<administrator username>" /SC ONLOGON /TR C:adminadmin.bat. There is a lot of flexibility to be had in any batch file that is launched by the task. If "C:adminadmin.bat" is set there=0 for /F %%G in ('find "%username%" C:accessusers.txt') do if ("%%G") EQU ("%username%") set there=1 if ("%there%") EQU ("1") start "real" "cmd" "/C "C:admin eal.bat"" and "C:admin eal.bat" contains whatever you really want to execute (hence the name), this script should solve the problem of letting the users choos

Categories : Misc

QT application rights for sudo command
Just searching around for "elevate privileges" in linux, this is what I found. Best way elevate the privileges programmatically under different versions of Linux? With an answer that pointed me here: http://en.wikipedia.org/wiki/PolicyKit http://www.freedesktop.org/wiki/Software/polkit/ Hope that helps.

Categories : C++

User page access rights in asp.net?
Either you can choose to use the built in Membership features in asp.net or you can choose to implement your own custom Membership- and Role Provider. The built in asp.net Membership Providers is a good option if your don't have to many users to manage. However if you already have these users and their roles already managed somewhere else Active Directory, Sql Database etc then I would implement my own Membership- and Role Providers. You can read more about it in this example: http://msdn.microsoft.com/en-us/library/6tc47t75(v=vs.100).aspx

Categories : C#

checking database rights on certain user
Here is a function for checking that all required views exists: bool IsAllviewsExists() { string DatabaseName= "Your_DB_NAME"; string[] viewsInDB = GetAllViewsNamesInDB(); for (int i = 0; i < viewsInDB.Length; ++i) { using (SqlCommand cmd = CreateSqlCommand(String.Format("SELECT id FROM sysobjects WHERE ID = OBJECT_ID('{0}.dbo.{1}') AND (type = 'V')", DatabaseName,viewsInDB [i]))) { using (DataTable objects = ExecuteDataTableQuery(cmd)) { if (objects.Rows.Count == 0) { return false; } } } } return true; } The functions that are called from IsAllviewsExi

Categories : C#

Run with elevated rights fails on WIN7
Most likely explanation is that this is a 32 bit vs 64 bit issue. The DLL is 64 bit, and you are running the 32 bit regsvr32. Or vice versa. Or the file system redirector is confounding you. You put the DLL in system32, but the redirector turns that into SysWow64. The obvious way to debug it is to remove the silent switch and let regsvr32 tell you what went wrong. As an aside, as you have discovered, you cannot use the return value of ShellExecuteEx to determine whether or not the server registration succeeded. The return value of ShellExecuteEx merely tells you whether or not the process started.

Categories : Delphi

Yii Framework Rights access menu
Make items for each menu option. Make permissions for this menu items, with roles which you want to show them. In your main layout( or where you output menu ): $role = Rights::getAssignedRoles(Yii::app() -> user -> Id); foreach ($role as $role) $role->name; if ($role->name == 'Manager' or Yii::app()->user->isSuperuser) { $this->widget('ext.cssmenu.CssMenu', array('items' => array(array('url' => array('/user/general/index'), 'label' => "General", 'visible' => Yii::app()->user->checkAccess('general')), array('url' => array('/data'), 'label' => "Data", 'visible' => Yii::app()->user->checkAccess('data')), array('url' => Yii::app()->getModule('user')->clientsUrl, 'label' =>

Categories : PHP

Linked servers and access rights
To deny access to specific tables in MySQL, use REVOKE: http://dev.mysql.com/doc/refman/5.0/en/revoke.html In TSQL, the command is DENY: http://technet.microsoft.com/en-us/library/ms173724.aspx In your case, though, if the MySQL users should not see certain tables, then doesn't that just mean that those tables should not have the triggers to replicate the data on MySQL? If replication is still necessary, and you are dealing with a large number of tables, you might also consider pushing the restricted tables to a separate target database, which could simplify access restrictions.

Categories : Mysql

Access Rights for Page In openerp 7
Try this: 'field_name': fields.char('Field Name', size=64,write= ['base.group_partner_manager'],read=['base.group_user']), or this: Create a functional field in your model which will be true if the user belong to the specified group else false, then add attrs for your field to make it editable if the user belong to the specified group else readonly.

Categories : Python

Execute an application with admin rights on system without UAC
I had a very similar problem, and I don't think the comments so far addressed your actual issue. I believe they are mistaking the intent of your question. While my answer will not show the actual UAC dialog as you first asked, it will show a workaround. UAC being off does NOT preclude an application from being run as Administrator (assuming you have an administrator password, as it seems you do), just makes it harder. As you rightfully pointed out, with UAC disabled and requireAdministrator set in the manifest, right-clicking and selecting Run as administrator does not actually elevate the process, as Microsoft indicates: "Application might launch but will fail later" Two Steps: 1) Hold Shift while Right-clicking on the application and select Run as a different user. Then simply use yo

Categories : C#

MEF how to handle access rights to PipelineSegments.store
You can use the AddInStore.Update method that takes the location of the pipeline root as a parameter instead of the one taking the PipelineStoreLocation. Similarly there is a AddInStore.FindAddIns overload taking the pipeline root as a parameter. Instead of deploying your addins in Program Files you can use Program Data instead where a standard user has full access. Have a look at the answer (from Microsoft Support) to a similar question.

Categories : Dotnet

jenkins doesn't have rights to copy files - or does it?
OK, I got it to work, I restarted the jenkins server and it worked. I assume it did not work before, because the jenkins server was already running when I changed its permissions. Makes sense to me now, come to think of it :) Anyway, thanks for anybody reading and thinking about this!

Categories : Jenkins

Web interfaces for distribution rights to the Trac, SVN, proftpd
trac.ini can be edit via webinterface with TracIniAdminPanelPlugin. I don't know webinterfaces for the other ones. I think it's because there are so many ways to setup the authorization configurations.

Categories : Svn

Is there a way to give debugging rights for a particular database in SQLServer?
You can use PRINT function after critical lines to write out result of specific set and that's one way of debugging, though little deprecated. Other way is to try to give to login a specific permissions needed for DEBUG stored procedures, like VIEW SERVER STATE, VIEW DATABASE STATE, maybe even ALTER TRACE.

Categories : Asp Net

How to get the dimensions of the rights notices on Google Maps v3?
I think maps will ensure right notices are not overlapped when you place custom control using map.controls[google.maps.ControlPosition.BOTTOM].push(control) method. But I didn't check it.

Categories : Javascript

Check if a CRM user has the rights to qualify a lead via JS
You could add an enabled or disable rule based on a JavaScript call which checks the users security roles an example is available here: http://dynamicscrm2011.wordpress.com/2011/05/19/ribbon-customization-part-11enabledisable-ribbon-button-based-on-security-role/

Categories : Javascript

View link if depended on user rights
I think the good idea is set some variable or constans after logged (if user has privileges) and uses if statement for check. if($allow === true) { echo $html->link('Edit',... } or use AuthComponent::user() in Views. This idea it's not good if we can many kind of admins (admin, moderator, reviewier, etc.) Maybe someone will have a better solution

Categories : Cakephp

Git clone error 'access rights' only on particular computer
When you're in Windows, see if you're logged in first with the following console commands (use Cygwin, not the Windows terminal) : git config --global user.name git config --global user.email You need to be logged into a Git account with access rights to that repository. Use the same commands you'd use for UNIX but in Cygwin. If you're using Github, there's a nice little GUI for it, as well as a UNIX-like terminal. The following download should install both. http://windows.github.com/ Once you can "log in", click the grey checkbox next to this answer so that other people know it works.

Categories : GIT

How install Tortoise GIT instalation without admin rights?
Not yet: bug 726 is still opened. This installation with reduced features has been done for mercurial (portable TortoiseHg), but not for TortoiseGit yet. The only workaround, mentioned in this comment is to install it once (with elevated privileges), zip the installation directory, and use that archive on other machine. Obviously the all menu integration in the Windows Explorer wouldn't be present. That requires a Microsoft Visual C++ Redistributable version though (also mentioned here): If you run a application and got the error message The program can’t start because MSVCR110.dll is missing from your computer. then the Microsoft Visual C++ Redistributable is missing on the current computer. This error appears when you wish to run a software which require the Microsoft

Categories : GIT

how to display and set user rights in firebird database
The gsec utility allows one to manage users which are allowed to connect to specific Firebird server instance. Ie it allows to manage the user list Firebird server would recognize (see gsec manual). But it doesn't allow you to manage what each user is allowed to do in some particular database. For managing user rights in particular database you should use roles and GRANT and REVOKE statements. I suggest you use some GUI tool to manage user rights, ie Flamerobin.

Categories : SQL

C++ virtual method: access rights, friends & Co
class Foo { public: friend class Baz; protected: virtual void doIt() = 0; }; class Baz : public Foo { public: Baz(Foo* foo) : M_foo(foo) { } protected: void doIt() { M_foo->doIt(); } private: Foo* M_foo; };

Categories : C++

SocialAuth - Facebook Authentication - Specify which access rights are requested
You can add custom permission like this. graph.facebook.com.consumer_key = 152190004803645 graph.facebook.com.consumer_secret = 64c94bd02180b0ade85889b44b2ba7c4 graph.facebook.com.custom_permission = email,user_birthday,user_location No need to set other properties. But if you want to set other properties, then only you can set request_token_url (for OAuth1.0), authentication_url and access_token_url. This feature is available from socialauth-4.2 graph.facebook.com.authentication_url graph.facebook.com.access_token_url

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.