Different IDs for the “Usage and Health Data Collection Service Application” managed service

I am working on sharepoint on-premises 2013. and i am trying to get the ID of the “Usage and Health Data Collection Service Application”, but i got different IDs:-

1) When i run this powershell i get this ID:-

PS C:\Users\spfarm.user> Get-SPServiceApplication -Name  WSS_UsageApplication  DisplayName          TypeName             Id -----------          --------             -- WSS_UsageApplication Usage and Health ... 80ace510-005c-4786-86fc-bfd3848e2d79 

While using this powershell i got this ID:-

PS C:\Users\spfarm.user> Get-SPServiceApplicationProxy      DisplayName          TypeName             Id     -----------          --------             --     WSS_UsageApplication Usage and Health ... 21c44849-db6e-4be8-9d2e-84755dcc664a 

so which IDs i should trust? or i have an issue inside our farm? Thanks

Possible to find average CPU usage over time in top?

Is it possible to use top to get the CPU usage of the process over time?

Running top with the d command allows me to change the delay, but does this change the rate at which it just refreshes (taking the CPU at the time) or does it provide an average since the last refresh?

In webmin i’ll see the CPU usage bounce between 50%-20%, very odd, when i run top i’m seeing closer to 20 on every reading. If i change the delay is it possible its sampling when it dips to 20%, or does the delay average usage since last sample?

gzip strange idle usage?

I’ve noticed last couple of nights my fans come on lightly as if the cpu was being used. Found the culprit is gzip, however no open files and pretty much nothing else to show. What could it be up to ?

Only shows … “Control Group: /system.slice/anacron.service”

How to get PIDs of processes with most network usage in descending order

I’m using my phone’s hotspot for using internet on my laptop with Ubuntu 18.04 installed. But even if I’m not doing anything, my laptop is still using the data and consumed my whole data pack within 20 minutes.

This is happening from last 3 days and I’m looking for a solution. I want to know what exactly is using this much data?

On Windows, network usage is directly visible in Task Manager. So, I guess there is an equivalent way to do the same on Linux.

I tried using ps command but I don’t think it gives details about network usage (Correct me if I’m wrong).

Also, I tried searching on stackoverflow and came across tools like iftop and many others. But I’m not able to find any details about the cause of the issue from any of the tools.

I’m not even able to install those tools mentioned on the articles found on the web/stackoverflow.

So, I want to know if there is any command that will sort the processes according to the network usage and that too without using any tools that need to be installed.

Is there any way to do this?

Code Structure: Keep classes simple or keep usage simple?

Tl;dr: In terms of the “high cohesion and low coupling” principle, how do I best deal with many simple objects that need to access the strings.xml resource in order to correctly parse an output?

I’m setting up an app in android studio that handles accounts and stores payments to those accounts. I have set up a class for payments and accounts respectively and until now tried to keep them as simple as possible, so they don’t have to store any references to other classes. However, since this is an android app, I want to make use of the formatting options provided by the strings.xml resource file.

My question is, is there a way to keep the classes as simple as possible(i.e. not have them deal with the main activity to get the strings.xml resource), while also preserving the simplicity of payment.getTimeString() call?

And if not, in terms of high cohesion and low coupling, would it be smarter to give all those elements a reference to the main activity, so they can access the strings.xml resource? Or would it be smarter to create a function in a handler class, that transforms the output of the payment- or account objects, which would mean that, when switching activities for example, I not only have to reference the object I want the new activity to work with, but also the handler that transforms the output? Or is there a different solution entirely that I’m not thinking about?

Example A:
Payment Class:

public class Payment implements Serializable {     private Calendar time;     private Activity mainActivity;     [...]      public Payment(Calendar time, Activity mainActivity, ...) {         this.time = time;         this.mainActivity = mainActivity;         [...]     }      [...]      public String getTimeString() {         DateFormat dateFormat = new SimpleDateFormat(mainActivity.getResources().getString(R.string.dateFormat));         return dateFormat.format(time.getTime());     } 

Example B:
Payment Class:

public class Payment implements Serializable {     private Calendar time;     [...]      public Payment(Calendar time, ...) {         this.time = time;         [...]     }      [...]      public Calendar getTime() {         return time;     } 

AccountHandler:

public class AccountHandler implements Serializable {     private Activity activity;     [...]      public AccountHandler(MainActivity activity) {         this.activity = activity;     }      public String parseTime(Calendar time) {         DateFormat dateFormat = new SimpleDateFormat(mainActivity.getResources().getString(R.string.dateFormat));         return dateFormat.format(time.getTime());     } 

Edit: I originally asked this question on StackOverflow. I was told to post it on Code Review instead, as it would better fit there. However on Code Review I was told that my question was not suited for Code Review and that I should ask here instead. So I hope the question does fit this board!

Does the Cavalier fighter’s usage limit on the Unwavering Mark feature apply to the creatures you can mark, or just the bonus attacks you can make?

Does the Cavalier fighter’s usage limit on the Unwavering Mark feature apply to the creatures you can mark or just the bonus attacks you can make?

Basically I’m curious if just the attacks are limited or if it is the mark itself that is limited. If it is the mark itself that is limited then the power disappears pretty quick and is not super useful, but if it’s only the attacks that are limited then the marking can be useful for a long time and should be used on multiple enemies every turn if possible, to avoid having others take damage.

cupsd service high memory usage

I’m running Ubuntu 16.04 with cups installed for printing. I’m observing that the cups service is gradually increasing memory and reaches 100% in few hours of time.

Could someone help me to find what the actual reason could be for this high memory usage ?

Version inform√Ętion :

apt-cache policy cups cups: Installed: 2.1.3-4ubuntu0.9 Candidate: 2.1.3-4ubuntu0.9 Version table: *** 2.1.3-4ubuntu0.9 500 500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages 100 /var/lib/dpkg/status 2.1.3-4ubuntu0.6 500 500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages 2.1.3-4 500 500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Usage of NON Clustered Index in SQL Server

I have 2 Index:

CREATE NONCLUSTERED INDEX [IX_1] ON [dbo].[TableA] (     [Column1] ASC,     [Column2] ASC )  CREATE NONCLUSTERED INDEX [IX_2] ON [dbo].[TableA] (     [Column3] asc ) 

Now I have 2 update:

Update TableA SET Column3='' where Column1='' 

the above Update was using Index 1st and then Key lookup to clustered Index

Update TableA SET Column3='' where Column3='' 

This update was using 2nd index

Based on the Update I thought I can delete 2nd index and update the first one with

CREATE NONCLUSTERED INDEX [IX_1] ON [dbo].[TableA] (   [Column1] ASC,   [Column2] ASC ) INCLUDE(Column3 asc) 

So with the updated index the First Update works fine,it uses the updated Non Clustered Index , but for second update it ask me to create a non clustered index on column3.

Then I tried

CREATE NONCLUSTERED INDEX [IX_1] ON [dbo].[TableA] (   [Column1] ASC,   [Column2] ASC,   [Column3] asc ) 

But still for second update it ask me to create a new non clustered index.

But why it ask me to create new, because what I understand is Column1, Column2, Column3 will be present in Root level for non clustered Index

Best practices for usage of 3rd-party API with another API?

I’m building a tool for my school that will interface with the Canvas API, and as of now the repo is structured as an MVC app with the main folders being models/, controllers/, and routes/. What are some best practices with regards to directory structure when integrating other APIs into your own? Is adding a services/canvas.rb the right idea?