0

I would like to develop a new program for Ubuntu that will

  • monitor the user's activity ,If user frequently uses a particular software "X" in certain time (like 8:00 A.M - 10:00 A.M ) ,when the time is reaching 8:00 A.M my program should say "Do you like to open software "X" now?" in an alert message .
  • If a user installing something like JAVA, my program should say "these software may help after your current installation :- eclipse , Geany "

likewise my program should give suggestions to user according to his/her activity .

Where can I start? should I create my own log to log user activity or can I access syslog to monitor user's activity?

2
  • To produce a good answer, I think you need a much closer definition of what it should do exactly. An example: in certain time (like 8:00 A.M - 10:00 A.M ) : what is frequently, what to do with exceptions in usage? Take the average startup time? The first? What to do if the software is used spread over the day (relatively) evenly spread? etc. Also, the question is actually two quite different ones :), where the accepted answer seems to be part of the second one. Jun 4, 2015 at 18:03
  • I guess for each hour which software open frequently , of course exceptions are there but in most common case this will work, for example smartphones stores frequently typed words and suggest those words when we type, another example browsers shows the frequent opened pages as home quick access tabs. Same as i want to suggest to the user with time basis Jun 5, 2015 at 3:52

2 Answers 2

0

These sound like two completely different problems. IMO, you should create two separate pieces of software, one for each of them. (If there isn't yet something to do so).


To see whether something was installed, you can monitor the file /var/log/dpkg.log. It will contain any dpkg events, for installation, removing, configuring, etc. The lines in there look like:

2015-06-04 12:57:15 status installed numlockx:amd64 1.2-5

You will, however, run into a problem, if the system is not using an English locale. Also, this does not cover manual package installations, e.g. when installing something to /usr/local/ or /opt/. It is practically impossible to watch all methods of software installation.


For watching which programs are being run by a user, you can monitor the process list, obtainable with ps -u <username>.

3
  • So what can i do first? I guess i should do the first part instead of second part. If i accessed ps -u <username> log, then can i implement my program?? Jun 4, 2015 at 15:16
  • I don't really get your question. Besides, programming questions rather belong to stackoverflow.com. If they are highly ubuntu-related, you can however ask a new question here. If you want a program generically applicable on Linux systems, you may want to ask on unix.stackexchange.com
    – s3lph
    Jun 4, 2015 at 15:24
  • thank you. is there similar softwares available? Jun 4, 2015 at 15:37
0

That's an expert system

What you want to build is something like an expert system:

It has "workd knowledge" - it knows facts about the system

It can react on changes in the system based on rules that describe what human experts have written down, mostly.

It can also use logic inference for some things - but that is rather limited, because the problems to handle are not very clearly structured.


This overview diagram shows the main components of an expert system:

enter image description here
Image from Expert Systems A-level AICT Questions By Navid Saqib


So, what am I trying to say with this post? I want to say that the kind of program you think about can get very complicated - often too complicated to be realized.

So be aware of this, and start with a small part, instead of trying to get "the main part" to run at once.

7
  • thank you for your information . So i decided to do the first part so that please give me advice how can i start my project? Jun 4, 2015 at 15:21
  • You should find out what you realistically can finish, in a way that it is really useful in some way. That is very hard to find out, it depends on lots of things. In this case, make sure you aim low in general - because it could get huge. You could work with hundreds of developers multiple years - that has been done' Im sure. Jun 4, 2015 at 15:25
  • One way to start would be to write down some rules like in your examples, and then make the system perfectly work with these rules. On the way, you will find that you should collect all kinds of extra information and add extra rules and input - but ignore all that, make the initial rules work. That is about the same as I wrote above, but more to you example. Jun 4, 2015 at 15:29
  • Oh, and when you did that minimal rule system, or tried at least, you will understand how that is difficult to keep the complexity under control - it's something that can not really be learned in theory, you need to experience it. Jun 4, 2015 at 15:30
  • thank you . i took this idea for my final year project. I have 8 months to complete my final year project. So what is your suggestion ?? drop this idea or minimal rules system? Jun 4, 2015 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .