Quantcast

How to tell which version of a application is running

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
70 messages Options
1234
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to tell which version of a application is running

Chris-2
I have two versions of tracker installed, one through the system
install of 16.04LTS

apt-cache policy tracker
tracker:
  Installed: 1.6.2-0ubuntu1.1
  Candidate: 1.6.2-0ubuntu1.1
  Version table:
 *** 1.6.2-0ubuntu1.1 500

The other,

tracker --version
Tracker 1.12.0

I installed from source recently hoping to stop tracker from filling up
my syslog with notations such as I've posted here - https://pastebin.co
m/rWpuwgEJ every time I restart the system when required (although it
hasn't stopped as you can see by the date in the log entries).

Question is, which version of tracker is running? Is it 1.6.2 located
in 

which -a tracker
/usr/local/bin/tracker
/usr/bin/tracker

/usr/bin$ ls -l tracker
-rwxr-xr-x 1 root root 115296 Oct 11  2016 tracker

or 1.12.0 located

/usr/local/bin$ ls -l tracker
-rwxr-xr-x 1 root root 410160 Apr  1 14:20 tracker

Does the version located in /usr/local/bin take precedence over the
version located in /usr/bin?

Please, only helpful replies.

Thanks
Chris

-- 
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
06:40:38 up 9:30, 1 user, load average: 0.28, 0.35, 0.41
Description: Ubuntu 16.04.2 LTS, kernel 4.4.0-72-generic

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
Chris schreef op 16-04-2017 14:23:

> Please, only helpful replies.

Which one takes precedence depends on your PATH.

However if it is getting loaded through (a systemd) service then it will
likely directly execute the old one.

Looking at the filelist

/etc/xdg/autostart/tracker-store.desktop
/usr/lib/x86_64-linux-gnu/tracker-1.0/writeback-modules/libwriteback-taglib.so
/usr/lib/x86_64-linux-gnu/tracker-1.0/writeback-modules/libwriteback-xmp.so
/usr/share/dbus-1/services/org.freedesktop.Tracker1.Writeback.service
/usr/share/dbus-1/services/org.freedesktop.Tracker1.service

There is not a lot that can automatically start it but I don't know how
this works.

But anyway; if all else is equivalent, you can just symlink the new one
to the old one:

# mv /usr/bin/tracker{,.backup}
# ln -s /usr/local/bin/tracker /usr/bin/

And see what happens.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
Xen schreef op 16-04-2017 14:44:

> # mv /usr/bin/tracker{,.backup}
> # ln -s /usr/local/bin/tracker /usr/bin/

Also, after that:

# apt-mark hold tracker

To prevent this symlink from being overwritten on package updates.

The above might obviously not work if it keeps using old libraries;
however those are not many either.

If it barks, you know you will have to replace more stuff, but hopefully
you can just:

1. remove the binary altogether (or rename it without creating a
symlink)
2. find reference to the binarie(s) in the above mentioned files.

/etc/xdg/autostart/tracker-store.desktop
/usr/lib/x86_64-linux-gnu/tracker-1.0/writeback-modules/libwriteback-taglib.so
/usr/lib/x86_64-linux-gnu/tracker-1.0/writeback-modules/libwriteback-xmp.so
/usr/share/dbus-1/services/org.freedesktop.Tracker1.Writeback.service
/usr/share/dbus-1/services/org.freedesktop.Tracker1.service

and point them to /usr/local/bin/tracker instead.

Something like that at least.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Chris-2
In reply to this post by Xen
On Sun, 2017-04-16 at 14:44 +0200, Xen wrote:

> Chris schreef op 16-04-2017 14:23:
>
> >
> > Please, only helpful replies.
> Which one takes precedence depends on your PATH.
>
> However if it is getting loaded through (a systemd) service then it
> will 
> likely directly execute the old one.
>
> Looking at the filelist
>
> /etc/xdg/autostart/tracker-store.desktop
> /usr/lib/x86_64-linux-gnu/tracker-1.0/writeback-modules/libwriteback-
> taglib.so
> /usr/lib/x86_64-linux-gnu/tracker-1.0/writeback-modules/libwriteback-
> xmp.so
> /usr/share/dbus-1/services/org.freedesktop.Tracker1.Writeback.service
> /usr/share/dbus-1/services/org.freedesktop.Tracker1.service
>
> There is not a lot that can automatically start it but I don't know
> how 
> this works.
>
> But anyway; if all else is equivalent, you can just symlink the new
> one 
> to the old one:
>
> # mv /usr/bin/tracker{,.backup}
> # ln -s /usr/local/bin/tracker /usr/bin/
>
> And see what happens.
>
Thanks for the reply Xen, what I want to be sure of is that 1.12.0 is
running vice 1.6.2. Both locations are in my path

echo $PATH
/home/chris/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
:/bin:/usr/games:/usr/local/games:/snap/bin

I see what you mean by making the symlink, I'll give that a try. I see
that will make sure that no matter which one is called on the restart
it will always be the newest one.

Thanks, I'll get back with results.

Chris

--
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
07:50:16 up 10:39, 1 user, load average: 0.73, 0.55, 0.47
Description: Ubuntu 16.04.2 LTS, kernel 4.4.0-72-generic

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
In reply to this post by Chris-2
Chris schreef op 16-04-2017 14:23:

> Question is, which version of tracker is running? Is it 1.6.2 located
> in 

Also as a more direct answer to your question, if the binary is
currently active (it shows up in ps aux) then

you could do

ps ax -o cmd | grep [t]racker

to find the command-line of the binary (the full path).

or

cat /proc/$(pgrep tracker | head -1)/cmdline; echo

for something more convoluted ;-).

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
In reply to this post by Chris-2
Chris schreef op 16-04-2017 14:58:

> Thanks for the reply Xen, what I want to be sure of is that 1.12.0 is
> running vice 1.6.2. Both locations are in my path
>
> echo $PATH
> /home/chris/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
> :/bin:/usr/games:/usr/local/games:/snap/bin

I meant that when you run it from the command line the first path
element is going to be used that matches, so for you it will be
/usr/local/bin

But another tool might do something different so if it is started with a
direct link, your path won't help you.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Karl Auer
In reply to this post by Chris-2
On Sun, 2017-04-16 at 07:23 -0500, Chris wrote:
> Question is, which version of tracker is running?

Rename the Ubuntu version to tracker.org and reboot (or restart tracker
if it's a systemd-type thing). That way it has to be your version or
none. But read the rest of this message first.

You could uninstall tracker using apt-get; it will uninstall the Ubuntu
one, leaving only yours. However, I suspect that yours will not be run
automatically without further work.

> Does the version located in /usr/local/bin take precedence over the
> version located in /usr/bin?

It depends :-)

If the program is being launched with an explicit path, then that
particular path will always be used. Some programs override it, but you
can probably see the full path in a process list.

For example, this is what I see if I grep a process list for "cups":

7270 ?        Ssl    0:00 /usr/sbin/cups-browsed

cups-browsed is started by systemd, using this service file:
 
/lib/systemd/system/cups-browsed.service

And we look inside the service file we find:

ExecStart=/usr/sbin/cups-browsed

This is typical: systemd and similar system startup methods will
generally use an explicit path, so if tracker is started automatically
by systemd (or any other automatic startup method) you will need to
adjust it to run your version. That is, you will need to edit the
relevant files to use the correct paths. Using symbolic links might
work, but can lead to extreme confusion, so I really don't recommend
it.

I suggest you run "ps ax | grep tracker" and see if the process list
tells you which executable is running. It's faster than a reboot.

If a program is run without an explicit path (which is usually the case
for things started from the command line in a terminal, for example)
then which program runs will depend on what directories they are in and
the order of those directories in the PATH variable that applies in the
environment launching the program. If you are starting it yourself, run
"echo $PATH" in a terminal to see what order they are in.

Usually, /usr/local/bin appears before /usr/bin (and /usr/local/sbin
before /usr/sbin) so that local versions of things override the
standard installs. That is usually what is required. But you should
check.

Just to make things interesting, some programs are started from
"wrappers". Firefox is a good example of this. When you run firefox,
you are actually running a script which does a bunch of stuff before
finally running an actual binary executable. The *script* is run from
your path, but it runs the "real" executable with an explicit path.

On my system, "which firefox" returns "/usr/bin/firefox", but when I
grep for firefox in a process list, I find "/usr/lib/firefox/firefox".

> Please, only helpful replies.

While it is true that people do sometimes offer unhelpful replies, very
few people provide replies that they do not themselves consider to be
helpful.

They may be wrong, but in the vast majority of cases, the attempt is
made in good faith. It is up you you to judge usefulness. If people are
willing to give of their time to try to help you, you should respect
their attempt.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A
Old fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
Karl Auer schreef op 16-04-2017 15:24:

> While it is true that people do sometimes offer unhelpful replies, very
> few people provide replies that they do not themselves consider to be
> helpful.
>
> They may be wrong, but in the vast majority of cases, the attempt is
> made in good faith. It is up you you to judge usefulness. If people are
> willing to give of their time to try to help you, you should respect
> their attempt.

He meant no replies criticizing his attempt.

You see, if a reply is only criticizing some attempt,

then asking for that reply not to be critizised would be rather
hypocritical, you see.

Other than that, I agree ;-).

Regards :p.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
In reply to this post by Karl Auer
Karl Auer schreef op 16-04-2017 15:24:

> They may be wrong, but in the vast majority of cases, the attempt is
> made in good faith.

Just saying, "good faith" cost me the ability to walk.

I mean literally that I can barely walk because someone thought they had
to intervene with something in "good faith".

If someone has to justify their actions by saying "good faith" or "good
intents" then clearly they have no other reason for doing what they are
doing.

Ie. if you are baking a bread because you are hungry and want to eat it,
then you have a reason.

If you are only baking a bread because you "intend well" then clearly
you don't really have a reason for doing so.

Otherwise you wouldn't mention the "excuse" of "good intents".

I'm just saying that "good intents" generally don't buy you anything.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Karl Auer
On Sun, 2017-04-16 at 16:03 +0200, Xen wrote:
> Karl Auer schreef op 16-04-2017 15:24:
> Just saying, "good faith" cost me the ability to walk.

Perhaps you don't understand the meaning of "in good faith". It simply
means "done honestly, without malice and with the intention of doing
good".

> If someone has to justify their actions by saying "good faith" or
> "good intents" then clearly they have no other reason for doing what
> they are doing.

Not at all. A lot of people don't know or do not recognise the limits
of their experience or their knowledge, and offer bad advice. They are
wrong, but they do not know it; their intentions are good. That's very
different from someone who deliberately provides advice that they know
to be harmful.

People using the advice they get here MUST judge that advice for
themselves.

> Otherwise you wouldn't mention the "excuse" of "good intents".

It's not an excuse; it's a description. Offering help that you KNOW is
wrong or harmful is by definition not in good faith.

   https://www.youtube.com/watch?v=mfwN0X8YnWo

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A
Old fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
Karl Auer schreef op 16-04-2017 16:46:

> It's not an excuse; it's a description. Offering help that you KNOW is
> wrong or harmful is by definition not in good faith.

If you were to defend the actions behind the fact (and thereby ensuring
they continue) even if you know now at least that they had bad
consequences, is what I have an issue with.

We have a very good right to be angry with people doing harmful things
without knowing but who keep insisting that they know better and thereby
continue their harmful behaviours.

That is what I have an issue with, not the harmful behaviour in itself,
but the people justifying it even after the fact saying there was
nothing wrong with it because it was done in good faith ;-).

(And thereby ensuring that it never changes...)

Some of these people doing harmful things without knowing (it could be
anyone) are very vocal and insisting and persistent with these things.

Some of them (it could be anyone) do great harm and then when called out
for it they will shrug, say "I meant well" and continue on as if they
never damaged anything ;-).

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Ralf Mardorf-2
In reply to this post by Xen
On Sun, 16 Apr 2017 14:51:51 +0200, Xen wrote:

>Xen schreef op 16-04-2017 14:44:
>
>> # mv /usr/bin/tracker{,.backup}
>> # ln -s /usr/local/bin/tracker /usr/bin/  
>
>Also, after that:
>
># apt-mark hold tracker
>
>To prevent this symlink from being overwritten on package updates.

A few days back you mentioned that customisation using Ubuntu is as easy
as for Arch and now you are giving a bad advice, that even isn't required
using Ubuntu.

If you hold a package, you could run into issues, if a new version should
be required by an update.

Instead simply ensure that each time an upgrade wants to install
/usr/bin/tracker, it instead installs it as /usr/bin/tracker.backup by
running

sudo dpkg-divert --add --rename --divert /usr/bin/tracker.backup /usr/bin/tracker

Btw. I don't understand such a dirty hack, to install a package and
seemingly another version to /usr/local without a package. Ok, one reason
could be to provide tracker libs, for packages from official repositories,
a pitfall for a release model distro, but not for a rolling release such as
Arch Linux.

If the OP should be unable to build Ubuntu packages, the OP should consider
to test if automatically building a package using "checkinstall" does the job.

However,regarding soname issues that are required by tracker, the OP has
to rebuild the version in /usr/local manually, if it's required.

Apart from this, what is true for /usr/bin/ vs /usr/local/bin, is true for
the libs as well, so to not break apps from official repositories, keeping
the libs of official repositories is required, so maybe keeping the original
package and the new version in parallel is a good idea.

Happy customising ;).



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
Ralf Mardorf schreef op 16-04-2017 17:37:

> A few days back you mentioned that customisation using Ubuntu is as
> easy
> as for Arch and now you are giving a bad advice, that even isn't
> required
> using Ubuntu.

Well actually I never mentioned binaries you know.

I mentioned the re-application of configuration and of course I am happy
to admit that there is a lot I do not know.

And I know Ubuntu is difficult (or Debian) with "fighting against the
automatic package system" in that sense.

> If you hold a package, you could run into issues, if a new version
> should
> be required by an update.

I guess you meant that Arch does not have version dependencies?

(I always wonder why, and if, each application actually does require all
those updates. Do you get around that in Arch by simply being required
to always have the latest of everything?)

> sudo dpkg-divert --add --rename --divert /usr/bin/tracker.backup
> /usr/bin/tracker
>
> Btw. I don't understand such a dirty hack, to install a package and
> seemingly another version to /usr/local without a package. Ok, one
> reason
> could be to provide tracker libs, for packages from official
> repositories,
> a pitfall for a release model distro, but not for a rolling release
> such as
> Arch Linux.
>
> If the OP should be unable to build Ubuntu packages, the OP should
> consider
> to test if automatically building a package using "checkinstall" does
> the job.

That is awesome.

But if you wanted to replace the original package you'd need to give it
a proper name and version number and that would be all, right?

Then you would have no reason to worry anymore?

So,

after compiling
"checkinstall --pkgname <name> --pkgversion <version>"

might already do the trick in having something that can replace the
previously installed package?


>
> However,regarding soname issues that are required by tracker, the OP
> has
> to rebuild the version in /usr/local manually, if it's required.
>
> Apart from this, what is true for /usr/bin/ vs /usr/local/bin, is true
> for
> the libs as well, so to not break apps from official repositories,
> keeping
> the libs of official repositories is required, so maybe keeping the
> original
> package and the new version in parallel is a good idea.

Well that was the whole point. Apparently some older version was still
getting started.

It's hard to tell sometimes what is linked from where, especially with
these GUI systems and dbus and all, particularly if you don't know
everything about it.

But in any case my intent was for the problem to first be solved, worry
comes later ;-).

> Happy customising ;).

You just told us how to do it right? :P.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Ralf Mardorf-2
On Sun, 16 Apr 2017 18:09:31 +0200, Xen wrote:
>I guess you meant that Arch does not have version dependencies?
>
>(I always wonder why, and if, each application actually does require
>all those updates. Do you get around that in Arch by simply being
>required to always have the latest of everything?)

More or less "yes". Official repositories not always necessarily provide
the latest stable versions from upstream, but all packages from
official repositories fit to each other. To keep it short, Arch Linux
doesn't support partial upgrades, if a user doesn't want to upgrade
everything from official repositories, the user has to manage this. It
is possible to add the version of a dependency to a package, so a user
could rebuild packages were the version is important.

>> If the OP should be unable to build Ubuntu packages, the OP should
>> consider to test if automatically building a package using
>> "checkinstall" does the job.  
>
>That is awesome.
>
>But if you wanted to replace the original package you'd need to give
>it a proper name and version number and that would be all, right?
>
>Then you would have no reason to worry anymore?

No, it wouldn't become worriless that easy.

Taking a look at the tracker, https://tracker.debian.org/pkg/tracker ,
it's split to several packages, so when building just one package with
"checkinstall" instead of building it the Debian/Ubuntu way, there might
be the need to fulfil dependencies by e.g. building dummy packages for
libtracker* etc., this could be done using equivs,
https://www.debian.org/doc/manuals/apt-howto/ch-helpers.en.html . I
guess the package's "Provides" option is tricky and doesn't work
without issues. There's still another issue. If the new version of
tracker provides different libs that cause soname conflicts with
packages from official repositories, depending on dedicated versions
from tracker libs. It's required to provide the old and the new
libs.
The advantage of a release model distro like Ubuntu is, that unlikely an
upgrade does cause a soname issue, so at least rebuilding the new
package should never be required and once after restoring the old libs
from a backup, the old and new libs could live together as long as the
same Ubuntu release is used.

I don't know tracker. For some software there's no need to care about
such issues. I simply build a single package for Claws using
checkinstall. Checkinstall provides a menu to edit all the information,
but I don't edit everything, I only edit it this way:

[root@moonstudio src]# grep -v \# claws.configure | grep sudo -A16
sudo checkinstall
----

0 -  Maintainer: [ Weremouse <[hidden email]> ]
1 -  Summary: [ A GTK+ based e-mail client - git checkout ]
2 -  Name:    [ claws-mail-git ]
3 -  Version: [ 3.15.0-20-g1d4d90 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL3 ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ claws ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ claws-mail ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

This works worriless for Claws, but for Evolution it even wouldn't work
worriless, when building Evolution packages the Debian/Ubuntu way, as
soon as Evolution from git requires a different GNOME/GTK
environment, than provided by the official Ubuntu repositories.

Regards,
Ralf

--
The Turkish constitutional referendum is completed. I couldn't find the
result in the Internet, but even while the new German DVB-T2 doesn't
work correctly, I at least heard that 51% voted for "yes". What next? A
civil war? Just 51% voted for yes, despite ballot rigging, despite
oppression against opposition. This pseudo-majority pro Erdoğan is a
clear vote against Recep Tayyip Erdoğan. This is the end of his career
and IMO European governments should only talk with the Turkish
opposition and The International Court of Justice should already
prepare a lawsuit against tyrant Recep Tayyip Erdoğan.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Chris-2
In reply to this post by Xen
On Sun, 2017-04-16 at 15:04 +0200, Xen wrote:

> Chris schreef op 16-04-2017 14:23:
>
> >
> > Question is, which version of tracker is running? Is it 1.6.2
> > located
> > in 
> Also as a more direct answer to your question, if the binary is 
> currently active (it shows up in ps aux) then
>
> you could do
>
> ps ax -o cmd | grep [t]racker
>
> to find the command-line of the binary (the full path).
>
> or
>
> cat /proc/$(pgrep tracker | head -1)/cmdline; echo
>
> for something more convoluted ;-).
>
First I apologize for not sending any replies yesterday. I have
'issues' from the time I was in the Army and just couldn't do it. That
said, Xen, I've tried both of the commands you noted above, actually
did a C/P into terminal and get:

chris@localhost:~$ ps ax -o cmd | grep [t]racker (no output from this
at all)

chris@localhost:~$ cat /proc/$(pgrep tracker | head -1)/cmdline; echo
BOOT_IMAGE=/boot/vmlinuz-4.4.0-72-generic root=UUID=4254a7e9-429b-4f53-
a08c-ae7ff839b98f ro

This one just gives me information on the kernel I currently have
installed.

I'll move on to see what other posts there are. I see quite a few

Chris

--
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
07:46:32 up 17:34, 3 users, load average: 0.57, 0.63, 0.44
Description: Ubuntu 16.04.2 LTS, kernel 4.4.0-72-generic

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Xen
Chris schreef op 17-04-2017 14:55:

> First I apologize for not sending any replies yesterday. I have
> 'issues' from the time I was in the Army and just couldn't do it. That
> said, Xen, I've tried both of the commands you noted above, actually
> did a C/P into terminal and get:
>
> chris@localhost:~$ ps ax -o cmd | grep [t]racker (no output from this
> at all)

So the program is not running, but it is probably started infrequently.

There must be some dbus command that starts it, I don't know.

I don't know anything about it really (about tracker).

(Or about anything ;-)).

> chris@localhost:~$ cat /proc/$(pgrep tracker | head -1)/cmdline; echo
> BOOT_IMAGE=/boot/vmlinuz-4.4.0-72-generic root=UUID=4254a7e9-429b-4f53-
> a08c-ae7ff839b98f ro
>
> This one just gives me information on the kernel I currently have
> installed.

Yeah, you just got /proc/cmdline because tracker is not running.

> I'll move on to see what other posts there are. I see quite a few

Yeah, don't worry.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Jeff Lane-2
Ummm,, why not just check with Apt to see where it installed the
ubuntu package version??

bladernr@galactica:~/development/git/$ dpkg -L tracker
/.
/usr
/usr/bin
/usr/bin/tracker-import
/usr/bin/tracker-sparql
/usr/bin/tracker-tag
/usr/bin/tracker-control
/usr/bin/tracker-stats
/usr/bin/tracker-info
/usr/bin/tracker
/usr/bin/tracker-search
. . .

Looks to me like the ubuntu package installs everything into /usr/bin
and never touches /usr/local/bin

bladernr@galactica:~/development/git/$ apt-cache policy tracker
tracker:
  Installed: 1.6.2-0ubuntu1.1
  Candidate: 1.6.2-0ubuntu1.1
  Version table:
 *** 1.6.2-0ubuntu1.1 500
        500 http://archive.ubuntu.com/ubuntu xenial-updates/universe
amd64 Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/universe
amd64 Packages
        100 /var/lib/dpkg/status
     1.6.2-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Ralf Mardorf-2
On Mon, 17 Apr 2017 09:13:40 -0400, J wrote:
>Ummm,, why not just check with Apt to see where it installed the
>ubuntu package version??

Because this only tells what version of tracker is installed by a
package, not what version of tracker is running.

Take a look at the OP's original request from
Sun, 16 Apr 2017 07:23:13 -0500:
>I have two versions of tracker installed

Regards,
Ralf


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Chris-2
In reply to this post by Xen
On Mon, 2017-04-17 at 15:07 +0200, Xen wrote:

> Chris schreef op 17-04-2017 14:55:
>
> >
> > First I apologize for not sending any replies yesterday. I have
> > 'issues' from the time I was in the Army and just couldn't do it.
> > That
> > said, Xen, I've tried both of the commands you noted above,
> > actually
> > did a C/P into terminal and get:
> >
> > chris@localhost:~$ ps ax -o cmd | grep [t]racker (no output from
> > this
> > at all)
> So the program is not running, but it is probably started
> infrequently.
>
> There must be some dbus command that starts it, I don't know.
>
> I don't know anything about it really (about tracker).
>
> (Or about anything ;-)).
>
> >
> > chris@localhost:~$ cat /proc/$(pgrep tracker | head -1)/cmdline;
> > echo
> > BOOT_IMAGE=/boot/vmlinuz-4.4.0-72-generic root=UUID=4254a7e9-429b-
> > 4f53-
> > a08c-ae7ff839b98f ro
> >
> > This one just gives me information on the kernel I currently have
> > installed.
> Yeah, you just got /proc/cmdline because tracker is not running.
>
> >
> > I'll move on to see what other posts there are. I see quite a few
> Yeah, don't worry.
>
I forgot that I'd had to stop the tracker daemon yesterday because it
was just filling up my syslog with all the entries I'd posted in my
original post. It was also heating up the CPU cores to around 140F. I'd
gone through and reset the tracker db from instructions on the tracker
list and I 'assume' it was working on rebuilding it. However I just
logged out and in again and tracker restarted. I did run your command
before I stopped it and go the following:

chris@localhost:~$ ps ax -o cmd | grep [t]racker
/usr/lib/tracker/tracker-miner-apps
/usr/lib/tracker/tracker-extract
/usr/local/libexec/tracker-store
/usr/lib/tracker/tracker-miner-fs
/usr/lib/tracker/tracker-miner-user-guides

I only had a chance to run one and do it quickly before I had to stop
the daemon or I was afraid my CPU would melt :(

Just to show how much is being written to syslog this is the size of
just yesterdays log from the time it was restarted yesterday morning
until it was rotated this morning - 1.7 GB (1,670,648,287 bytes)

I'll read through and make replies to the rest of the posts today as I
can.

I do want to thank in advance all of you who sent me replies and
suggestions.

Chris

--
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
08:10:30 up 17:58, 4 users, load average: 4.49, 3.27, 1.64
Description: Ubuntu 16.04.2 LTS, kernel 4.4.0-72-generic

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to tell which version of a application is running

Ralf Mardorf-2
In reply to this post by Xen
On Mon, 17 Apr 2017 15:07:17 +0200, Xen wrote:
>So the program is not running

Even if the program would run, your scripts not necessarily return the
path. If the program was started without a path, then no path is shown.

[rocketmouse@archlinux ~]$ killall -9 pluma; pluma 2>/dev/null & ps ax -o cmd | grep [p]luma
pluma: no process found
[1]+  Done                    pluma 2> /dev/null
[1] 1645
pluma
[rocketmouse@archlinux ~]$ killall -9 pluma; pluma 2>/dev/null & cat /proc/$(pgrep pluma)/cmdline; echo
pluma: no process found
[1]+  Done                    pluma 2> /dev/null
[1] 1654
pluma
[rocketmouse@archlinux ~]$ killall -9 pluma; /usr/bin/pluma 2>/dev/null & ps ax -o cmd | grep [p]luma
pluma: no process found
[1]+  Done                    pluma 2> /dev/null
[1] 1662
/usr/bin/pluma
[rocketmouse@archlinux ~]$ killall -9 pluma; /usr/bin/pluma 2>/dev/null & cat /proc/$(pgrep pluma)/cmdline; echo
pluma: no process found
[1]+  Done                    /usr/bin/pluma 2> /dev/null
[1] 1671
/usr/bin/pluma

Assumed it shouldn't show the path, then the PATH variable helps.
IIRC you or somebody else mentioned this already.

[rocketmouse@archlinux ~]$ cat /usr/bin/pseudo-tracker
#!/bin/dash
echo $0
exit
[rocketmouse@archlinux ~]$ cat /usr/local/bin/pseudo-tracker
#!/bin/dash
echo $0
exit
[rocketmouse@archlinux ~]$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/snap/bin:/usr/lib/icecat:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
[rocketmouse@archlinux ~]$ pseudo-tracker
/usr/local/bin/pseudo-tracker

Regards,
Ralf


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
1234
Loading...