~noskcaj/ubuntu/vivid/gnome-system-monitor/titlebars

« back to all changes in this revision

Viewing changes to src/procproperties.cpp

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2014-02-17 22:12:59 UTC
  • mfrom: (1.4.12) (15 sid)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: package-import@ubuntu.com-20140217221259-khdbenb3wt1b81zw
Tags: 3.11.90-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 * GNU General Public License for more details.
15
15
 *
16
16
 * You should have received a copy of the GNU Library General Public
17
 
 * License along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
 
17
 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
19
18
 *
20
19
 */
21
20
 
80
79
    else
81
80
        HZ = (cinf.stathz ? cinf.stathz : cinf.hz);
82
81
#endif
 
82
#ifdef __GNU__
 
83
    int HZ;
 
84
    HZ = sysconf(_SC_CLK_TCK);
 
85
    if (HZ < 0)
 
86
        HZ = 100;
 
87
#endif
83
88
    proc_arg proc_props[] = {
84
89
        { N_("Process Name"), g_strdup_printf("%s", info->name)},
85
90
        { N_("User"), g_strdup_printf("%s (%d)", info->user.c_str(), info->uid)},
98
103
        { N_("Nice"), g_strdup_printf("%d", info->nice)},
99
104
        { N_("Priority"), g_strdup_printf("%s", procman::get_nice_level(info->nice)) },
100
105
        { N_("ID"), g_strdup_printf("%d", info->pid)},
101
 
        { N_("Security Context"), g_strdup_printf("%s", info->security_context)},
 
106
        { N_("Security Context"), info->security_context?g_strdup_printf("%s", info->security_context):g_strdup(_("N/A"))},
102
107
        { N_("Command Line"), g_strdup_printf("%s", info->arguments)},
103
108
        { N_("Waiting Channel"), g_strdup_printf("%s", info->wchan)},
104
 
        { N_("Control Group"), info->cgroup_name?g_strdup_printf("%s", info->cgroup_name):g_strdup("")},
 
109
        { N_("Control Group"), info->cgroup_name?g_strdup_printf("%s", info->cgroup_name):g_strdup(_("N/A"))},
105
110
        { NULL, NULL}
106
111
    };
107
112